Hello All,
Just recently upgraded to 5.7.5 XI from 5.6.14 and it appears to have broken my check_dns service check.
This is the command I have been using:
$USER1$/check_dns -H $HOSTADDRESS$ $ARG1$
The error I get below when using an IP
[nagios@nagios02 ~]$ /usr/local/nagios/libexec/check_dns -H 192.168.11.88
DNS CRITICAL - query type of -querytype=A was not found for 192.168.11.88
The error I get below when using hostname
[nagios@nagios02 ~]$ /usr/local/nagios/libexec/check_dns -H prodmgt01
DNS OK: 0.015 seconds response time. prodmgt01 returns 192.168.11.88|time=0.015023s;;;0.000000
How do I force it to check hostname and not IP?
Thank you
Ryan
Weird behavior check_dns
Re: Weird behavior check_dns
By default the check_dns plugin will try to resolve a hostname to an IP address. This info is stored in an 'A' record so the message you're seeing is correct.
To resolve an IP to a hostname you need the PTR record. You can make check_dns look for this record with the -q option:
To resolve an IP to a hostname you need the PTR record. You can make check_dns look for this record with the -q option:
Code: Select all
/usr/local/nagios/libexec/check_dns -H 192.168.11.88 -qAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Weird behavior check_dns
That did the trick! added "-q PTR"
Thank you!
Thank you!
Re: Weird behavior check_dns
Glad to hear!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.