check_fping vs check_ping


#1

The docs say that fping performs better, but it seems to be taking longer to me:

time ./check_ping -H 64.233.179.99 -w 3000.0,80% -c 5000.0,100% -p 1
PING OK - Packet loss = 0%, RTA = 25.00 ms
0.01u 0.01s 0:00.04 50.0%

time ./check_fping 64.233.179.99
FPING OK - 64.233.179.99 (loss=0%, rta=23.900000 ms)|loss=0%;;;0;100 rta=0.023900s;;;0.000000
0.01u 0.01s 0:00.53 3.7%

Does that seem correct?


#2

I think you might be correct. I switched to fping long ago, but what I found recently is check_icmp. It’s much much much better than either one.


#3

From what I’ve found, check_fping is only better than check_ping in that if all the requests time out, it reports this much quicker. However, as you said check_icmp is by far the best. I’ve included some data below so that others might see the benefit. Thanks for letting me know about this!

Tests to a box on the local network:

time ./check_icmp -H 10.60.48.244 -n 5
OK - 10.60.48.244: rta 0.519ms, lost 0%|rta=0.519ms;200.000;500.000;0;pl=0%;40;80;;
0.00u 0.01s 0:00.33 3.0%

time ./check_ping -w 100,100% -c 500,100% -H 10.60.48.244
PING OK - Packet loss = 0%, RTA = 0.00 ms
0.01u 0.00s 0:04.01 0.2%

time ./check_fping -H 10.60.48.244 -n 5
FPING OK - 10.60.48.244 (loss=0%, rta=0.640000 ms)|loss=0%;;;0;100 rta=0.000640s;;;0.000000
0.00u 0.01s 0:04.56 0.2%

Tests on microsoft.com (which is configured to not respond):

time ./check_fping -H 207.46.198.30 -n 5
FPING CRITICAL - 207.46.198.30 (loss=100% )|loss=100%;;;0;100
0.02u 0.00s 0:04.60 0.4%

time ./check_icmp -H 207.46.198.30 -n 5
CRITICAL - 207.46.198.30: rta nan, lost 100%|rta=0.000ms;200.000;500.000;0; pl=100%;40;80;;
0.01u 0.00s 0:02.96 0.3%

time /opt/FONnagios/libexec/check_ping -w 100,100% -c 500,100% -H 207.46.198.30 -p 5
CRITICAL - Plugin timed out after 10 seconds
0.00u 0.01s 0:10.00 0.1%

In the last case, it doesn’t even seem like check_ping is behaving as expected.