[Nagiosplug-devel] check_ping plugin is not processing the -p option properly
shadih rahman
shadhin71 at gmail.com
Wed Aug 19 18:35:20 CEST 2009
I did some troubleshooting and found the following.
-t option controls the actual -w option for /bin/ping
if you add -t option in check_ping plugin then it add the -w option in
/bin/ping command. If we don't put -t option then it automatically adds -w
option with default 10 value
so if we do '/bin/ping -n -U -w 10 -c 1 host A' the following is the output
PING host A (x.x.x.x) 56(84) bytes of data.
64 bytes from 128.59.60.22: icmp_seq=4 ttl=59 time=2.95 ms
--- unixrack5-ups1.cc.columbia.edu ping statistics ---
4 packets transmitted, 1 received, 75% packet loss, time 3002ms
rtt min/avg/max/mdev = 2.952/2.952/2.952/0.000 ms
however if you do '/bin/ping -n -U -c 1 host A' we get the following output
PING host A (x.x.x.x) 56(84) bytes of data.
--- unixrack5-ups1.cc.columbia.edu ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
Would it be possible not to add the -w option by default. Please advise on
this. Thanks
P. S - I am running rhel 5 with kernel version 2.6.18-128.2.1.el5
On Wed, Aug 19, 2009 at 11:57 AM, shadih rahman <shadhin71 at gmail.com> wrote:
> All,
> I have noticed that check_ping plugin is not processing the -p option
> properly.
>
> I have the following command definition
>
> define command{
> command_name check-host-alive
> command_line $USER1$/check_ping -H $HOSTADDRESS$ t 45 -4 -w
> 3000.0,100% -c 3000.0,100% -p 1
> }
>
>
> ./check_ping -H Hos A -p 1 -t 45 -4 -w 2000.0,30% -c 3000.0,40%
> PING CRITICAL - Packet loss = 50%, RTA = 2.50
> ms|rta=2.498000ms;2000.000000;3000.000000;0.000000 pl=50%;30;40;0
>
>
>
>
> If I am sending 1 packet, how is it possible to receive 50% packet loss.
> Please advise on this. Thanks
>
>
>
>
> --
> Cordially,
> Shadhin Rahman
>
--
Cordially,
Shadhin Rahman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nagios-plugins.org/archive/devel/attachments/20090819/b14eb992/attachment.html>
More information about the Devel
mailing list