Creating a No-Ping Host Template in Nagios
Instructions for creating a no-ping host template in Nagios based on the generic-host template
Sometimes we need to monitor a host that doesn't respond to ping. To do this, we need to use a no-ping host template. Otherwise, Nagios will attempt to ping the host, get a failure, decide the host is down, and skip all of the other checks.
To do this, create a copy of /etc/nagios3/conf.d/generic-host.cfg and call it /etc/nagios3/conf.d/noping-host.cfg.
Change the name to be nohost-ping and remove the link that starts with check_command. The resulting file should look like this:
# Generic host definition template - This is NOT a real host, just a template!
# Generic host definition template - This is NOT a real host, just a template!
define host{
name noping-host ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
max_check_attempts 10
notification_interval 0
notification_period 24x7
notification_options d,u,r
contact_groups admins
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
Then, when you setup the cfg files, reference noping-host instead of generic-host.
In the Nagios web interface, if you would like the host to appear green instead of gray, you can submit a Passive Check marking it as UP.

