Problem
I'm running Nagios on Solaris 9 from the CSW (Blastwave) repository:
- nagios 2.10,REV=2007.11.19
- nagiosp 1.4.11,REV=2008.01.05
I am attempting to monitor a DNS server. The nagios check-dns server function claims that the DNS server is not working (ie the test domain does not resolve); however, if I test the dns server directly (ie dig @server) it works.
I've seen this in two circumstances:
- I had a working AD server; I re-ip'd it to another subnet. The check-dns worked correctly in the old location; in the new location, it claims the DNS server is not working.
- I had a Solaris system running a DNS server. I created two secondary interfaces (to catch DNS requests sent to the old location of the AD server, above). check-dns claims that the DNS server on the secondary interfaces do not work, while the DNS server on the main interface does work.
# /opt/csw/libexec/nagios-plugins/check_dns -H google.ca dns-ph-10
Domain google.ca was not found by the server
Solution
Check-dns is running nslookup. Nslookup fails when the DNS server has no reverse-PTR record.
# /opt/csw/libexec/nagios-plugins/check_dns -v -H google.ca dns-ph-10
/usr/sbin/nslookup google.ca dns-ph-10
*** Can't find server name for address 10.0.0.10: Non-existent host/domain
Domain google.ca was not found by the server
Add a reverse-PTR entry, and check_dns works (again).