6.5.1 DNS check with nslookup

The check_dns plugin checks whether a specified host name can be resolved to an IP address. Used locally, the plugin tests the DNS configuration of the computer on which it is run. For the name resolution, it uses the name server configured in /etc/resolv.conf.

The possible options are just as unspectacular.

-H host / --hostname=host

This is the host name to be resolved to an IP address.

-s dns-server / --server=dns-server

This switch explicitly specifies the name server to be used. If this option is missing, check_dns uses the name server from /etc/resolv.conf.

-a ip_address / --expected-address=ip_address

The ip_address is the IP address that host should have. If the name service returns a different address, the plugin ...

Get Nagios, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.