check_fping vs check_ping


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

time ./check_ping -H -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
FPING OK - (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?


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.


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 -n 5
OK - 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
PING OK - Packet loss = 0%, RTA = 0.00 ms
0.01u 0.00s 0:04.01 0.2%

time ./check_fping -H -n 5
FPING OK - (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 (which is configured to not respond):

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

time ./check_icmp -H -n 5
CRITICAL - 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 -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.