Host-check: what to do when icmp is blocked?


#1

I have 2 servers that are in a datacenter. The datacenter blocks all icmp traffic, where I can not get it turned on (co location).

Is there a way so that my nagios server isn’t trying to check for host up?

I don’t generally use ping, because I have 10 services or more being checked. I’ll know when something is wrong by the huge amount of alerts I’ll get.

Any ideas? Really I’d like it so that everything shows up “in the green”.


#2

You’ll see something like this in your hosts.cfg:

check_command check-host-alive

associated with that host. Just make a new checkcommand in checkcommands.cfg that runs a script that doesn’t really do anything, then change your hosts.cfg check_command to that. Heres an example:
define command{
command_name no-icmp-host
command_line /bin/return_ok.sh
}

then heres your /bin/return_ok.sh:
!#/bin/bash
echo "PING OK - Packet loss = 0%, RTA = 0.16 ms"
exit 0

And heres your new hosts.cfg definition:
define host{
use common-host-template
host_name coloserver
alias Colocation Server 1
address 65.43.124.78
check_command no-icmp-host
contact_groups critical-admins
}

(change as necessary)

Good luck!