Home

Search this site:
 

Horshack’s
very
own site

 

This is Bavaria, Germany!
You will find links to Perl,
bootdisks for system administration,
a lot of Linux,
Windows administration
and some personal belongings.
Nagios, Host down because unpingable

Nagios, Host down because unpingable

Some hosts are not pingable. There is a firewall in front of them preventing that. Although all services from this hosts are running, the host itself is assumed to be down.

The solution is to check the "host-alive-status" with another service.

Define a new nagios-command

echolon:/etc/nagios/echolon# cat checkcommands.cfg 
# checkcommands.cfg - Nagios configuration file for local user changes
#
# Nagios packages wont touch this file anymore. If you want to define
# your own commands for nagios use this file and add the commands here.
# Dont add any command with a name that already exists or nagios wont
# run.
define command {
    command_name check-host-alive-by-http
    command_line $USER1$/check_http -H $HOSTADDRESS
}
Now you can use this command in the hosts.cfg, not in the services.cfg as usual!

define host{
    use           generic-host
    host_name     a-host-behind-a-firewall.mydomain.de
    alias         a-host-behind-a-firewall.mydomain.de
    address       a-host-behind-a-firewall.mydomain.de
    ; I cannot reach this host by ping
    ; to prevent a "host down" and all services running,
    ; I check the host-alive with another service running there
    check_command check-host-alive-by-http
}
Back to my Nagios homepage.
Impressum