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

Trigger Overview with Show Any shows only Problems

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 4.0.1
    • Frontend (F)

      Starting with version 4.0, the trigger overview view on both the overview page and dashboard widget has a quirk where it refuses to show all of the OK triggers if there are any in Problem status. I do also note that this causes a large overview to load way faster when there are some Problems to show so it may be intended or a regression from enhancing the overview query.

       

      I don't have any experience with PHP but I've tracked it down to these lines in include/triggers.inc.php inside the function getTriggersWithActualSeverity

       

      $triggerids = zbx_objectValues($problems, 'objectid');
      $triggers = array_intersect_key($triggers, array_fill_keys($triggerids, ''));

       

      This seems to have a side effect of always filtering out triggers in OK status that match no $problems. I have edited this to confirm that this is where the issue is and also added a threshold value to make grids of over 300 items load quickly and show only the Problems:

       

      if (count($triggers) > 300) {
      $triggerids = zbx_objectValues($problems, 'objectid');
      $triggers = array_intersect_key($triggers, array_fill_keys($triggerids, ''));
      }

       

      So now our modest size grid of a group of 7 servers will mix loading OK and Problem values, but our larger grid of SNMP data from 24-port Cisco devices will either be all OK or just the Problems loaded quickly.

       

      I wanted to submit this to either confirm the behavior is intentional or point out where the patch needs to be focused.

       

            Unassigned Unassigned
            asmoore82@gmail.com Adam Moore
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: