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

Merge change() and diff()

XMLWordPrintable

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

      According to the documentation, change() and diff() do the same kind of comparison, accepting the same parameters and the same data types, though the wording seems wrong to me on change():


      "The difference between last and previous values." – It ain't the difference.
      Supported value types: float, int, str, text, log

      For strings returns:
      0 - values are equal
      1 - values differ


      "Checking if last and previous values differ."
      Supported value types: float, int, str, text, log

      Returns:
      1 - last and previous values differ
      0 - otherwise

      Looking at the code, the implementation is different for float and int, but identical for the other types. Furthermore, the function documentation claims to accept a parameter, which it effectively doesn't.

      I would suggest to either clarify the difference between the two or to drop one of them, making it an alias for the remaining.

            Unassigned Unassigned
            volter Volker Fröhlich
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: