[Nagiosplug-help] How to implement host checks with broken check_icmp and check_ping?

Ralph.Grothe at itdz-berlin.de Ralph.Grothe at itdz-berlin.de
Thu Nov 30 12:30:45 CET 2006


Hello,

I have the absurd situation that nagios shows hosts as failed
while their services are all ok.

This leads to a flood of alert notifications to all contacts who
don't have host_notification_options set to n.
For the time being I have nagios running with the global
enable_notifications set to 0
in nagios.cfg, after accidentally having stirred up many
co-admins and customers yesterday
with bogus alerts.

The reason must be that I have a broken check_icmp as well as
check_ping binary.
(apropos, is there a download url for recent nagios-plugins
binaries pre-built for AIX 4.3?)

However, the check_icmp sometimes returns an OK while at other
times a CRITICAL.
This leads to a flapping behaviour.
But the OS'es ping command *always* returns with 0% packet loss!

Because the make all aborted during the compilation of check_swap
I only manually copied the compiled plugins to $USER1$ and set
suid bit to check_icmp
and created a hard link to check_host.
(maybe I have missed something?)

$ ls -il /opt/sw/nagios/libexec/check_{icmp,host}
624671 -r-sr-xr-x   2 root     nagios    250576 Nov 29 10:07
/opt/sw/nagios/libexec/check_host
624671 -r-sr-xr-x   2 root     nagios    250576 Nov 29 10:07
/opt/sw/nagios/libexec/check_icmp


e.g.

$ /opt/sw/nagios/libexec/check_host -H 127.0.0.1
CRITICAL - 127.0.0.1: rta nan, lost
100%|rta=0.000ms;1000.000;1000.000;0; pl=100%;100;100;; 

$ /opt/sw/nagios/libexec/check_icmp -H 127.0.01 -w 1000.0,50% -c
10000.0,80% -p 3
CRITICAL - 127.0.01: rta nan, lost
100%|rta=0.000ms;1000.000;10000.000;0; pl=100%;50;80;; 

$ /opt/sw/nagios/libexec/check_ping -H 127.0.0.1 -w 1000.0,50% -c
10000.0,80% -n 3
/usr/sbin/ping
CRITICAL - Could not interpret output from ping command

$ /usr/sbin/ping -c 3 127.0.0.1
PING 127.0.0.1: (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=0 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=255 time=0 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=255 time=0 ms

----127.0.0.1 PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms



I don't want to use a scripted ping plugin (which was easy to
rig)
I think as a makeshift I could use the check_fping plugin which
at least seems to work

$ /opt/sw/nagios/libexec/check_fping -H 127.0.0.1 -w 1000.0,50%
-c 10000.0,80% -n 3
FPING OK - 127.0.0.1 (loss=0%, rta=0.370000
ms)|loss=0%;50;80;0;100 rta=0.000370s;1.000000;10.00
0000;0.000000


But I thougt fping's main purpose was asynchronous pings to many
hosts?

So it would be nice if I got check_icmp to work reliably.
What do I have to look after in the Makefile(s) to get check_ping
and check_icmp built correctly?

Regards
Ralph







More information about the Help mailing list