Problems with check_icmp

Hi all,

I’m using Nagios 3.0.1 on Ubuntu 7.10 with nagios plugins 1.4.6. and encounter a problem with check_icmp.

For a host i have configured in my network (dell-testbak) I want to know if it is reachable.
I defined two services for this host. check_ping and check_icmp. I know it is almost the same but i want to use check_icmp because this generates performance date which can be used with PNP to make graphics.

When I use the check_ping command to check the IP-address i get a nice OK status:

PING OK 04-21-2008 10:53:47 10d 21h 20m 43s 1/3 PING OK - Packet loss = 0%, RTA = 0.58 ms
but for the same IP-address the check_icmp gives a CRITICAL status:

ICMP CRITICAL 04-21-2008 10:54:00 3d 0h 45m 33s 10/10 CRITICAL - 192.168.42.162: rta 0.264ms, lost 0%

This is strange because there are no packets lost. But in Nagios it got a HARD-state. So i looked in the logfile of nagios and found this:

[1208857094] SERVICE ALERT: dell-testbak;ICMP;CRITICAL;SOFT;1;CRITICAL - 192.168.42.162: rta 0.243ms, lost 0%
[1208857154] SERVICE ALERT: dell-testbak;ICMP;CRITICAL;SOFT;2;CRITICAL - 192.168.42.162: rta 0.264ms, lost 0%
[1208857214] SERVICE ALERT: dell-testbak;ICMP;CRITICAL;SOFT;3;CRITICAL - 192.168.42.162: rta 0.257ms, lost 0%
[1208857274] SERVICE ALERT: dell-testbak;ICMP;CRITICAL;SOFT;4;CRITICAL - 192.168.42.162: rta 0.256ms, lost 0%
[1208857334] SERVICE ALERT: dell-testbak;ICMP;CRITICAL;SOFT;5;CRITICAL - 192.168.42.162: rta 0.228ms, lost 0%
[1208857394] SERVICE ALERT: dell-testbak;ICMP;CRITICAL;SOFT;6;CRITICAL - 192.168.42.162: rta 0.283ms, lost 0%
[1208857454] SERVICE ALERT: dell-testbak;ICMP;CRITICAL;SOFT;7;CRITICAL - 192.168.42.162: rta 0.361ms, lost 0%
[1208857514] SERVICE ALERT: dell-testbak;ICMP;CRITICAL;SOFT;8;CRITICAL - 192.168.42.162: rta 0.253ms, lost 0%
[1208857574] SERVICE ALERT: dell-testbak;ICMP;CRITICAL;SOFT;9;CRITICAL - 192.168.42.162: rta 0.255ms, lost 0%
[1208857634] SERVICE ALERT: dell-testbak;ICMP;CRITICAL;HARD;10;CRITICAL - 192.168.42.162: rta 0.242ms, lost 0%
[1208857634] SERVICE NOTIFICATION: email-yvo;dell-testbak;ICMP;CRITICAL;notify-service-by-email;CRITICAL - 192.168.42.162: rta 0.242ms, lost 0%

Here are the command defition and the service definitions:

‘check_icmp’ command definition

define command{
command_name check_icmp
command_line $USER1$/check_icmp -H $HOSTADDRESS$ -w $ARG1$ -c SARG2$
}

define service{
name service-icmp
service_description ICMP
check_command check_icmp!1000.0,40%!2000.0,80%
max_check_attempts 10
register 0
use generic-service
}

Does anyone have an idea what the problem could be?
Thanks in advance,

Yvo

I found the problem. It was it the ARGUMENT 2 in the check_icmp command file. instead of using the $ sign i used the capital S.
capital S of stupid. haha