Hi, I installed nagios plugins and I’m trying to implement DNS check. From the command line
./check_dns -H domain.to.check -s 172.30.99.197 -a GOOD_IP_1 -a GOOD_IP_2 -c 2
gets me the correct result
DNS OK: 0.020 seconds response time. domain.to.check returns GOOD_IP_1|time=0.019513s;;2.000000;0.000000
Now I’m creating the service linked to the DNS server 172.30.99.197, so I put:
IP Address: the part that usually gets the -H parameter: domain.to.check
Parameters: -s 172.30.99.197 -a GOOD_IP_1 -a GOOD_IP_2
I tried any othe combination in the box (swapped -s and -H, put -H as ‘’), but always I get the second “-s” that is not in my parameters, and a double “-H” one of which is empty.
Which should be the correct IP/Parameters setting for my configuration?
Eventually I created a custom script that invokes the right command, but it is pretty weird.
Thanks
I tried, but check_dig seems to accept a single “-a” argument to check the result. If I put several ones (and I need to check several possible replies) I always get a WARNING
It works in the sense that it does not spit an error, but the result is always:
DNS WARNING - 0.009 seconds response time (Server not found in ANSWER SECTION)|time=0.009258s;;;0.000000
and if you run the command with -v you’ll find the it always check for the LAST -a you put. You can see the first line of the debug output Looking for: '1.2.3.4'.
Each -a overrides the preceding, it is semantically different form -a in check_dns
Does this DNS check only work with Linux servers or should it work with any DNS server?
I have this enabled for a Windows server running DNS but I just get ‘Error Drawing Graph’ for NTP Client and NTP Server.