[ZBXNEXT-8813] Support for values in scientific notation for numeric unsigned data type Created: 2023 Nov 02 Updated: 2023 Nov 08 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Server (S) |
Affects Version/s: | 6.0.23, 6.4.8 |
Fix Version/s: | None |
Type: | Change Request | Priority: | Minor |
Reporter: | Denis Rasikhov | Assignee: | Andris Zeila |
Resolution: | Unresolved | Votes: | 1 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() |
||||||||
Issue Links: |
|
Description |
It's very common that Prometheus data have values in scientific notation even if that's not really necessary, for example some metrics might look like this: # HELP minio_node_drive_free_inodes Free inodes on a drive # TYPE minio_node_drive_free_inodes gauge minio_node_drive_free_inodes{drive="/mnt/disk1/minio",server="minio-01.example.com:9000"} 5.242839e+06 Such metrics will fit the UInt64 data type, but if you'll try to set the item type to "Numeric (unsigned)", and test the Prometheus pattern in preprocessing steps for the item, it will treat the value as a string and not a number: So we either have to use the "Float" type for these to be automatically converted, or use some preprocessing: for example you can multiply the value by "1" before putting it into DB and it will work fine: Using float is an overkill in such cases and probably it would be better to add the automatic conversion for "Numeric (unsigned)" too and only then check if value actually fits the UInt64, because workarounds with additional preprocessing look odd as well. |