Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-1906

[Patch] Process logical operations as conditional operators in trigger expressions

XMLWordPrintable

      It's clone of ZBXNEXT-1894 (I cannot reopen and attach patches there).
      I propose two patches for zabbix 2.1.4.
      First one changes logic of processing trigger expressions: "true or unknown" is now "true"; "false and unknown" is "false", not "unknown". It's not affect unsupported items, only undefined expressions such as "min(300)" when no data exists during last 300 seconds.
      Second patch is more complex, it changes structures and algorithm of processing expressions. In addition to logic from first patch it does not evaluate trigger subexpressions (does not preform extra requests to database) if result of the whole expression is already known. For example, it's not needed to evaluate expressions {exp2}, {exp3} and {exp4} in trigger "{exp1}>0 | {exp2}>0 | {exp3}>0 | {exp4}>0" if value of {exp1} is positive. This should increase effectivity of the server.

      The patched version works good on my tests but I do not think the patches are ready for applying to trunk, they were not tested hard enough. Then, calculated items are not affected.
      You can consider it as explanaition what I meant in ZBXNEXT-1894.

        1. trapper-1min.png
          trapper-1min.png
          52 kB
        2. trapper-5min.png
          trapper-5min.png
          51 kB
        3. trigger-average.png
          trigger-average.png
          25 kB
        4. trigger-info.png
          trigger-info.png
          16 kB
        5. zabbix-expr.1.patch
          3 kB
        6. zabbix-expr.2.patch
          13 kB

            Unassigned Unassigned
            pgulchuk Pavel
            Votes:
            6 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: