check_ping version 2.2.1 Plugin Timeout (v2)
Posted: Mon Mar 04, 2019 11:18 am
Afternoon.
Im coming from https://support.nagios.com/forum/viewto ... =7&t=50429
Same version 2.2.1 and OS Debian 8 and 9
where the answer is:
If i take the pure ping as an example.
This is returning after 14seg, the 4 sec it took to do the pings and then the 10sec it took from the -W variable for timeout.
If i take the check_icmp as an example.
NOW, lets see the check_ping.
This is where im lost.
1) Why this behavior ONLY applies when you're using more than 1 packet. If i use -p 1 this is the reply
2) Why is taking 11 seg more to reply after the initial pings. Shouldnt it take similar to the time /bin/ping takes?
3) Since this is a monitoring tool, shouldn't the timeout specify to the entire command not only to the package count, similar to what check_icmp does?
Any clarification is appreciated.
Regards.
Im coming from https://support.nagios.com/forum/viewto ... =7&t=50429
Same version 2.2.1 and OS Debian 8 and 9
where the answer is:
I dont fully approved of the answer, i do understand it but i think it should be changed. Let me explain.This actually is fixing an issue with the previous version.
If you are sending 5 packets and waiting several seconds for each packet, a timeout of 10 should exit BEFORE it can continue to check all 5 times, which is what it is doing.
If i take the pure ping as an example.
Code: Select all
time /bin/ping -c 5 8.8.8.1 -W 10
PING 8.8.8.1 (8.8.8.1) 56(84) bytes of data.
--- 8.8.8.1 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4077ms
real 0m14.081s
user 0m0.000s
sys 0m0.000s
If i take the check_icmp as an example.
It actually returns what is expected. 5 packets in a timeout of 10.time /opt/wocu/embedded/nagios/libexec/check_icmp -H 8.8.8.1 -w 1000,100% -c 3000,100% -p 5 -t 10
CRITICAL - 8.8.8.1: rta nan, lost 100%|rta=0.000ms;1000.000;3000.000;0; pl=100%;100;100;; rtmax=0.000ms;;;; rtmin=0.000ms;;;;
real 0m10.004s
user 0m0.008s
sys 0m0.008s
NOW, lets see the check_ping.
Code: Select all
time /opt/wocu/embedded/nagios/libexec/check_ping -H 8.8.8.1 -w 1000,100% -c 3000,100% -p 5 -t 10
CRITICAL - Plugin timed out
real 0m21.003s
user 0m0.000s
sys 0m0.000s
1) Why this behavior ONLY applies when you're using more than 1 packet. If i use -p 1 this is the reply
Code: Select all
PING CRITICAL - Packet loss = 100%|rta=3000.000000ms;1000.000000;3000.000000;0.000000 pl=100%;100;100;03) Since this is a monitoring tool, shouldn't the timeout specify to the entire command not only to the package count, similar to what check_icmp does?
Any clarification is appreciated.
Regards.