-
Documentation task
-
Resolution: Fixed
-
Trivial
-
5.0.10, 5.2.6
-
None
-
Sprint 76 (May 2021), Sprint 77 (Jun 2021)
-
1
It's not very clear what packets are counted to provide "icmppingsec" key value. What happens for lost/timed out packets?
Would be nice to add this detail to documentation this way:
Packets which are lost or timed out are not used in calculation.
Proof:
Code, pinger.c:170
case ICMPPINGSEC: switch (item->type) { case ICMPPINGSEC_MIN: value_dbl = host->min; break; case ICMPPINGSEC_MAX: value_dbl = host->max; break; case ICMPPINGSEC_AVG: value_dbl = (0 != host->rcv ? host->sum / host->rcv : 0); break; }
Tested item key:
icmppingsec[27.112.106.10,10,350,,,avg]
Debug log for pinger and received value from Latest data page. All calculations confirm the source code logic:
68041:20210414:124432.315 /usr/bin/fping -C10 -p350 -i0 2>&1 </tmp/zabbix_server_68041.pinger; 68041:20210414:124432.643 read line [27.112.106.10 : [0], 84 bytes, 326 ms (326 avg, 0% loss)] 68041:20210414:124432.950 read line [27.112.106.10 : [1], 84 bytes, 283 ms (305 avg, 0% loss)] 68041:20210414:124433.650 read line [27.112.106.10 : [3], 84 bytes, 282 ms (297 avg, 25% loss)] 68041:20210414:124434.701 read line [27.112.106.10 : [6], 84 bytes, 283 ms (294 avg, 42% loss)] 68041:20210414:124435.084 read line [27.112.106.10 : [7], 84 bytes, 315 ms (298 avg, 37% loss)] 68041:20210414:124435.819 read line [] 68041:20210414:124435.819 read line [27.112.106.10 : 326.77 283.67 - 282.77 - - 283.05 315.85 - -] 68041:20210414:124435.819 End of zbx_ping():SUCCEED 68041:20210414:124435.819 In process_values() 68041:20210414:124435.819 host [27.112.106.10] cnt=10 rcv=5 min=0.282770 max=0.326770 sum=1.492110 2021-04-14 12:44:32 0.2984
68041:20210414:124632.348 /usr/bin/fping -C10 -p350 -i0 2>&1 </tmp/zabbix_server_68041.pinger; 68041:20210414:124632.616 read line [27.112.106.10 : [0], 84 bytes, 266 ms (266 avg, 0% loss)] 68041:20210414:124633.316 read line [27.112.106.10 : [2], 84 bytes, 265 ms (265 avg, 33% loss)] 68041:20210414:124634.087 read line [27.112.106.10 : [4], 84 bytes, 336 ms (289 avg, 40% loss)] 68041:20210414:124634.395 read line [27.112.106.10 : [5], 84 bytes, 294 ms (290 avg, 33% loss)] 68041:20210414:124635.112 read line [27.112.106.10 : [7], 84 bytes, 310 ms (294 avg, 37% loss)] 68041:20210414:124635.853 read line [] 68041:20210414:124635.853 read line [27.112.106.10 : 266.08 - 265.89 - 336.60 294.43 - 310.82 - -] 68041:20210414:124635.853 End of zbx_ping():SUCCEED 68041:20210414:124635.853 In process_values() 68041:20210414:124635.853 host [27.112.106.10] cnt=10 rcv=5 min=0.265890 max=0.336600 sum=1.473820 2021-04-14 12:46:32 0.2948
68041:20210414:124702.856 /usr/bin/fping -C10 -p350 -i0 2>&1 </tmp/zabbix_server_68041.pinger; 68041:20210414:124703.169 read line [27.112.106.10 : [0], 84 bytes, 311 ms (311 avg, 0% loss)] 68041:20210414:124703.891 read line [27.112.106.10 : [2], 84 bytes, 332 ms (322 avg, 33% loss)] 68041:20210414:124704.198 read line [27.112.106.10 : [3], 84 bytes, 289 ms (311 avg, 25% loss)] 68041:20210414:124704.604 read line [27.112.106.10 : [4], 84 bytes, 345 ms (319 avg, 20% loss)] 68041:20210414:124704.874 read line [27.112.106.10 : [5], 84 bytes, 265 ms (309 avg, 16% loss)] 68041:20210414:124705.627 read line [27.112.106.10 : [7], 84 bytes, 317 ms (310 avg, 25% loss)] 68041:20210414:124706.348 read line [27.112.106.10 : [9], 84 bytes, 338 ms (314 avg, 30% loss)] 68041:20210414:124706.360 read line [] 68041:20210414:124706.360 read line [27.112.106.10 : 311.75 - 332.47 289.52 345.44 265.94 - 317.73 - 338.12] 68041:20210414:124706.360 End of zbx_ping():SUCCEED 68041:20210414:124706.360 In process_values() 68041:20210414:124706.360 host [27.112.106.10] cnt=10 rcv=7 min=0.265940 max=0.345440 sum=2.200970 2021-04-14 12:47:02 0.3144