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

Zabbix calculates the value of second part in an expression with AND, even if the first is false!

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Trivial
    • Resolution: Duplicate
    • Affects Version/s: 4.0.6
    • Fix Version/s: None
    • Component/s: Server (S)
    • Labels:
      None

      Description

      I have two data items: swap total and swap free. I created a trigger with condition:

      {Custom Linux Memory Template:proc.meminfo.swaptotal.last()}>0 and (100*{Custom Linux Memory Template:proc.meminfo.swapfree.last()}/{Custom Linux Memory Template:proc.meminfo.swaptotal.last()})<10

      At the systems with swap partition or swap file, it works fine, but at the systems where no swap, I got "Division by zero", but I expected that the trigger will not be up, because the first part of the contion ({Custom Linux Memory Template:proc.meminfo.swaptotal.last()}>0) is false!

      In my opinion, there no meaning to calculate second part of the condition if the first part is false and "AND" will be lead to false in any case.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                edgar.akhmetshin Edgar Akhmetshin
                Reporter:
                corochoone Victor Vislobokov
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: