For When You Can't Have The Real Thing
[ start | index | login ]
start > nagios > DNS check fails on working DNS server

DNS check fails on working DNS server

Created by dave. Last edited by dave, 10 years and 260 days ago. Viewed 10,992 times. #3
[diff] [history] [edit] [rdf]
labels
attachments

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).

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt