Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-10054

Resulting float actually can be stored as integer if use custom multiplier or delta (speed per second) mode

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • Documentation (D)

      As we know if we send a float value to an integer item, we will get error "Received value [1.25] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]".

      That's ok and expected.

      But it appeared to be true that's it's possible to get calculated float value using "custom multiplier" or "delta (speed per second)" and store it to integer item!
      It's absolutely not obvious !

      For example in official template "Template OS Linux" for item prototypes like "traffic speed" we use item type integer but store as delta per second and that's fine.

      I tested and can say that the same applies if, for example, send value "10" to integer item with custom multiplier "0.33" and store As is, and successfully get "3" as integer to database while mathematics says it should be "3.3" .

      I believe all these details should be nicely documented, probably here https://www.zabbix.com/documentation/2.4/manual/config/items/item as a note below the table.

      Suggested text:
      If use custom multiplier or store value as Delta (speed per second) for items with type of information Numeric (unsigned) and resulting calculated value is actually a float number, the calculated value still will be accepted as correct one by discarding float part and storing the value as integer.

            Unassigned Unassigned
            zalex_ua Oleksii Zagorskyi
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: