[ZBXNEXT-3355] Add warning about 'type of information' and store value as 'delta (speed per second)' Created: 2016 Jul 31 Updated: 2016 Aug 03 Resolved: 2016 Aug 03 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Documentation (D) |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Change Request | Priority: | Trivial |
Reporter: | Glenn Matthys | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | delta, float | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
This morning I was debugging an issue with an item producing low values and flapping between 0 and 1, because I set 'Type of information' -> 'Numeric (unsigned)' and the actual item has very low, but integer values, where calculating it into speed per second was producing floats like 0,43, causing it to be stored as either a 0 or 1. The correct way to was to define this item with 'Numeric (float)'. It might be a good idea to make note of this in the documentation, because it might not be immediately obvious that the resulting calculation from speed per second might produce floats and floats below 1. An example: Note: As this calculation can produce floating point numbers, you'll most likely want the Type of information to be Numeric (float), even if the raw value is an integer. |
Comments |
Comment by Oleksii Zagorskyi [ 2016 Aug 01 ] |
A bit related discussion |
Comment by Martins Valkovskis [ 2016 Aug 01 ] |
Added to the 'Delta speed per sec' store value description at: https://www.zabbix.com/documentation/2.0/manual/config/items/item "As this calculation may produce floating point numbers, it is recommended to set the 'Type of information' to Numeric (float), even if the incoming raw values are integers." |
Comment by richlv [ 2016 Aug 01 ] |
this was discussed on irc in a lot of detail, but apparently we all forgot to comment here a problem might arise if the delta value would exceed the 'float' field length - entire value would be lost. in those cases it is actually suggested to use 'unsigned' and thus lose only the (tiny) decimal part. even more, the default zabbix templates do that for the network traffic items. as such, if the note will stay, it should be expanded to include the above and suggest using 'float' for small values and 'unsigned' for large values. |
Comment by Martins Valkovskis [ 2016 Aug 02 ] |
Thanks for adding this other side of the issue to the discussion The note in documentation has been expanded accordingly. |