Created
January 25, 2010 13:57
-
-
Save pparidans/285875 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Via: http://lena.franken.de/nagios/hosts_without_ping.html | |
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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment