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

Item preprocessing loses the fractional part of the number

    XMLWordPrintable

    Details

    • Type: Problem report
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4.0alpha1
    • Fix Version/s: 3.4.0alpha1, 3.4 (plan)
    • Component/s: Server (S)
    • Labels:
      None
    • Team:
      Team A
    • Sprint:
      Sprint 10, Sprint 11
    • Story Points:
      0.5

      Description

      I'm attempt to convert int value to float with preprocessing "Custom multiplier" function.

      Item type configuration - float, custom multiplier value 0.1.

      Originally, item value fetched by SNMP, net-snmp return ASN_INTEGER value, which converted to STRING in zbx_snmp_set_result() and passed up.
      Later, when server process preprocessig operations, STRING converted to UINT64 with zbx_variant_set_numeric() and multiplied to 0.1 value. Incorrect result (without fraction) stored in tables as FLOAT.

      current (bad) - 248 * 0.1 = 24.00000
      should be - 248 * 0.1 = 24.80000

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            lynxchaus Andrey Melnikov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: