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

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Trivial
    • None
    • Affects Version/s: 4.0.6
    • Component/s: 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.

            Assignee:
            Edgar Akhmetshin
            Reporter:
            Victor Vislobokov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: