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

    Details

    • Type: Problem report
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't fix
    • Affects Version/s: 1.8.5
    • Fix Version/s: None
    • Component/s: API (A)
    • Labels:
    • Environment:
      SLES 11.1 64 bit Apache 2 PHP 5

      Description

      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.'";

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: