While its important to know that the DNS service is running, it’s more important to know that DNS is serving up name resolution as expected. The check_dns command can be used to test name resolution for a name server.
On CentOS the commands are located here by default:
Arguments for the check_dns command:
You can test the command from the command line:
In order to use the command it must be defined in /etc/nagios/commands.cfg.
Define the service for the host that you want to check (ns1.domain.com) and provide the name that you want to resolve (www.google.com).