[Nagiosplug-devel] Error in check_ping
Thomas Guyot-Sionnest
dermoth at aei.ca
Wed Nov 5 20:06:44 CET 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Павел Тимофеев wrote:
> Good day to you!
> I find error in you check_ping plugin. Not even error, it`s rather defict. This defict displays when host is down.
> My system - FreeBSD 6.3, nagios plugins 1.4.13
>
>
> When I use check_ping plugin for ping host from server in same subnet, sometimes I have message "System call sent warnings to stderr"
>
> # /usr/local/nagios/libexec/check_ping -H 192.168.8.124 -w 12,5% -c 17,9% -t 30
> PING CRITICAL - System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr System call sent warnings to stderr Packet loss = 100%|rta=17.000000ms;12.000000;17.000000;0.000000 pl=100%;5;9;0
> (and in web-interface i see this message too)
>
> But if I ping host in another subnet, I haven`t this message
>
> # /usr/local/nagios/libexec/check_ping -H 192.168.2.244 -w 15,4% -c 19,10% -t 30
> PING CRITICAL - Packet loss = 100%
>
>
>
>
> If you use standart ping util to pinging this hosts you get this:
>
> Same subnet:
> # ping 192.168.8.124
> PING 192.168.8.124 (192.168.8.124): 56 data bytes
> ping: sendto: Host is down
> ping: sendto: Host is down
> ping: sendto: Host is down
> ping: sendto: Host is down
> ping: sendto: Host is down
> ^C
> --- 192.168.8.124 ping statistics ---
> 15 packets transmitted, 0 packets received, 100% packet loss
>
> Another subnet:
> # ping 192.168.2.244
> PING 192.168.2.244 (192.168.2.244): 56 data bytes
> ^C
> --- 192.168.2.244 ping statistics ---
> 2 packets transmitted, 0 packets received, 100% packet loss
> In this case you haven`t "ping: sendto: Host is down" messages in stderr.
>
>
> I saw your check_ping source. In you source not provide for this situation.
>
> It`s right?
check_ping tries to work with most common ping versions. If you have
unusual system or custom ping application installed, it is possible that
check_ping is unable to find the proper arguments or properly interpret
its output.
The best solution IMHO is using check_icmp instead. check_icmp has a
native ICMP implementation and therefore needs to be run with root
privileges, so be sure you have the setuid bit set for it (common
permissions for this binary is 4555 (-r-sr-xr-x) and owned by root).
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJEe7E6dZ+Kt5BchYRArO+AKCkNvJE0EtwgDSkmeGxrxW+ss8V6wCfVs8l
R+4lBnaQH9spWCj8CBKAKJI=
=mYMA
-----END PGP SIGNATURE-----
More information about the Devel
mailing list