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

only_true works as documented, but not as expected.

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Won't fix
    • Icon: Minor Minor
    • None
    • 1.8.5
    • API (A)
    • SLES 11.1 64 bit Apache 2 PHP 5

      Trigger.get()'s parameter only_true isn't really logical.

      One would assume that only_true means what it says.. grab only the triggers that are true.
      Instead, and as document, this pulls triggers that are true and have recently been true.

      only_true string Triggers in state PROBLEM and recently switched (30 min)

      I would propose to change class.ctrigger.php lines 516-518 from:

      $sql_parts['where']['ot'] = '((t.value='.TRIGGER_VALUE_TRUE.')'.
      ' OR '.
      '((t.value='.TRIGGER_VALUE_FALSE.') AND (t.lastchange>'.(time() - TRIGGER_FALSE_PERIOD).')))';

      to simply:

      $sql_parts['where']['ot'] = 't.value='.TRIGGER_VALUE_TRUE.'";

            Unassigned Unassigned
            lukemacneil Luke MacNeil
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: