Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
If we were to look at a very typical check_ping command definition, like the one used in Nagios XI, $HOSTADDRESS$ is used as part of the command_line parameter:
You could instead $HOSTNAME$ in the command_line parameter, though that is a bit counter intuitive since you could just set the address for the host to the FQDN:
You can put the FDQN of the host in the address field instead of the IP address. It doesn't have to be an IP address in that field, a host name will work as well.
The Nagios process will do a DNS lookup if there is a host name and the check should work the way you want.
Be sure to check out our Knowledgebase for helpful articles and solutions!