I want to monitor my DNS server with Nagios. I understand there's a check_dns plugin but I'm a total Nagios noob and I have no idea how I would go about using the plugin. All I want to do is the equivalent of making sure an nslookup command succeeds. Can someone point me in the right direction?
Monitor DNS server with Nagios
domain-name-systemnagios
Best Answer
login the nagios server with putty (windows) or slogin in a unix shell. If you login as root, become the nagios user:
Go to the /usr/local/nagios/libexec dir (assuming you have installed nagios from source, if you have used a package from your distribution, check the docs of your package):
execute the check_dns plugin with the --help switch. It will give you all the available options:
So, if you want to check that serverfault.com resolves to 69.59.196.211, yo do this:
As you can see you can also especify which DNS server to query with the -s switch, warning and critical thresholds, etc. Once you're satisfied with the check you run from the cli, you edit the nagios config file where you define the services (probably services.cfg) and apply the check to a given host(group). But that is much better documented in the fine manual you can even read from the web interface that got installed when you installed nagios.