[ZBX-6563] insufficient precision may result in incorrect data Created: 2013 May 04  Updated: 2017 May 30  Resolved: 2016 Sep 25

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: None
Fix Version/s: 2.2.13rc1, 3.0.3rc1, 3.2.0alpha1

Type: Incident report Priority: Critical
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: icmpping, precision
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBX-8122 Item icmppingsec can be equal 0 Closed
is duplicated by ZBX-10648 icmping / pinger issues with very low... Closed

 Description   

our current database schema is limited to 4 decimal places for decimal values ("float" type). in some cases this can result in incorrect data.
for example, icmppingsec documentation says "If host is not available (timeout reached), the item will return 0."

if we ping a low latency host (localhost being the easiest example), results from fping might be :

127.0.0.1 : [0], 84 bytes, 0.04 ms (0.04 avg, 0% loss)
127.0.0.1 : [1], 84 bytes, 0.04 ms (0.04 avg, 0% loss)
127.0.0.1 : [2], 84 bytes, 0.04 ms (0.04 avg, 0% loss)

127.0.0.1 : [0], 84 bytes, 0.04 ms (0.04 avg, 0% loss)
127.0.0.1 : [1], 84 bytes, 0.03 ms (0.03 avg, 0% loss)
127.0.0.1 : [2], 84 bytes, 0.06 ms (0.04 avg, 0% loss)

in both cases average would be below 0.05.

zabbix stores these values as seconds, and with decimal places limited to 4... we get all zeroes - which was supposed to indicate connection problems.



 Comments   
Comment by Alexei Vladishev [ 2013 Jul 17 ]

It is against our standards but we should probably keep ms in the database instead of converting to seconds.

Comment by Viktors Tjarve [ 2016 Apr 18 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-6563

If fping returns result that is greater then 0 but less than 0.0001 seconds the value stored will be 0.0001 seconds.

Comment by Aleksandrs Saveljevs [ 2016 Apr 20 ]

(1) We store the end result in the database, not individual pings. Therefore, if some individual pings are less than 10^-4, we should use them as is and not round them - only the end result (minimum, maximum or average).

viktors.tjarve RESOLVED

asaveljevs CLOSED

Comment by Aleksandrs Saveljevs [ 2016 Apr 28 ]

(2) Since we are likely to want to do similar rounding in other places, too (and, actually, we already do in "net.tcp.service[]"), I have introduced ZBX_FLOAT_PRECISION definition in r59788. Please take a look.

viktors.tjarve Looks good. CLOSED

Comment by Viktors Tjarve [ 2016 May 02 ]

Released in:

  • pre-2.2.13rc1 r59842
  • pre-3.0.3rc1 r59844
  • pre-3.1.0 r59845
Comment by Alexander Vladishev [ 2016 May 06 ]

(3) Documentation

viktors.tjarve RESOLVED

sasha CLOSED

Comment by richlv [ 2016 Aug 18 ]

regarding (3). upgrade notes currently say :

For low latency pings smallest possible value will be 0.0001 seconds if host is available instead of 0.0000 if return time is less than 0.00009 seconds (0.09 ms).

the second part is a bit confusing, as the reader might think "hmm, but what if the value is 0.000091 seconds ?"

also, maybe it's worth simplifying like the following or similar ?

If an "icmppingsec" item would return a value less than 0.0001 seconds, the value will be set to 0.0001 seconds.

and the same for whatsnew - and in whatsnew, it's also suggested to explain why is that done, otherwise the reader would be left guessing.

additionally, the comment also says that the simple check page https://www.zabbix.com/documentation/3.0/manual/config/items/itemtypes/simple_checks has been updated, but that does not seem to be the case - at least this page has been last updated in 2016/05/03

viktors.tjarve All RESOLVED.

Generated at Wed Apr 24 17:28:17 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.