[ZBX-10233] Item values multiplied by a big number, when using the "Use custom multiplier" field, might fail if the calculation result is too big. Created: 2016 Jan 06  Updated: 2017 May 30  Resolved: 2016 Jan 06

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: None
Fix Version/s: None

Type: Incident report Priority: Minor
Reporter: 11Thirty8 Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: float, multiplier, unsupported
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: CentOS 6.5
DB: MySQL 5.1.73
Zabbix ver.: 2.4.3


Issue Links:
Duplicate
duplicates ZBXNEXT-1736 increase 'float' precision & data length Closed
duplicates ZBX-8848 Incorrect value in the error message ... Open

 Description   

Type of received value [big number] is not suitable for value type [Numeric (float)] is the error received when a SNMP value gets multiplied by a big number.
An example could be 1073741824 (1024*1024*1024) when using the "Use custom multiplier" field, it might fail if the calculation result is too big.

Multiplying 315.2 with 1073741824 should result in 338443422924.8, but in Zabbix it results in 338443422924.799988.

If the number is even bigger, say 229204.4 times 1073741824 it should result in 246106350524825.6, but the item instead gets unsupported. Maybe because an additional five digits gets added as decimals like in the example above, pushing the number above the some size limit ?

These examples are SNMP values received as gigabyte sizes, on free and total disk space from a monitored storage unit. The plan is then to convert them into byte sizes to use Zabbix post processing by specifying "B" in the "Units" field on the template item.



 Comments   
Comment by Glebs Ivanovskis (Inactive) [ 2016 Jan 06 ]

338443422924.799988 must be the closest to 338443422924.8 number representable in binary double precision floating point number format. This is simply how things work.

Limit for Numeric (float) is 10^12, it's better to use Numeric (unsigned) (with a limit of 2^64) for counting bytes. You may probably loose one byte because of truncation, but it's not a big deal when counting gigabytes.

Comment by Aleksandrs Saveljevs [ 2016 Jan 06 ]

The supported range for float values is -10^12 through 10^12 (exclusive) with exactly 4 decimal digits, as documented at https://www.zabbix.com/documentation/2.4/manual/config/items/item . So it is working as expected. Increasing the value range is requested in ZBXNEXT-1736 .

The fact that multiplying 315.2 with 1073741824 results in 338443422924.799988 is due to floating-point precision and is reported at ZBX-8848 .

Seems that all issues are already covered, so closing as a duplicate of the above.

Comment by 11Thirty8 [ 2016 Jan 06 ]

I'm not able to use Numeric (unsigned) as the SNMP data is presented with a single decimal point as given in the example (315.2 or 229204.4)

Comment by Glebs Ivanovskis (Inactive) [ 2016 Jan 06 ]

Store 315.2 in original.item as Numeric (float) and create calculated item multiplied.item with expression last(original.item)*multiplier and store it as Numeric (unsigned).

Comment by 11Thirty8 [ 2016 Jan 06 ]

Perfect Glebs, the workaround works.

Generated at Fri May 16 09:11:22 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.