Nagios – Check Host without Ping
There are many good reasons to disable ping on a server. Typically I disable ping (ICMP) on my servers and add a iptables entry to allow the nagios monitoring service complete access to monitor the system.
It is a good idea to disable ping since generally someone could use it to sniff out your open ports and find possible vulnerabilities.
As of this post I am running Nagios 3.2.0. Occasionally you might be checking a host that has ping (ICMP) disabled or just doesn’t respond to ping requests. As you can see from the image below because the ping response is blocked and Nagios reports an issue even though all services on the client are running prefectly. It just can’t ping it!
Submitting a passive check result can be done via the Web Interface (among other ways) so you just need to login to Nagios, select the host in question and use the “Submit passive check result for this host” command option from the list of Host Commands.
check_tcp -p 80
Now you have the ability to check a host that has PING response disabled while displaying the correct state status. All services check will continue as normal but now you can display the up or down status