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!

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 4.0.6
    • Server (S)
    • None

      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.

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

              Created:
              Updated:
              Resolved: