Ad Widget

Collapse

Information trigger does not change icon into the map

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • icica
    Junior Member
    • Oct 2008
    • 19

    #1

    Information trigger does not change icon into the map

    Hello to all

    I need that the triggers defined with a level of severity as information do not change the icon into the map

    Is this possible?

    Thank you in advance
  • tighep
    Senior Member
    • Dec 2007
    • 124

    #2
    I made a custom hack to the maps php code to only show items with a high severity on the map. Here's what I changed:
    include/maps.inc.php

    on line 498, I added "AND t.priority >= 4" into the query.

    I'm sure someone with more time and PHP experience could produce a drop-down that would let you select the level of trigger that you see.

    I hope that is helpful.

    Comment

    • icica
      Junior Member
      • Oct 2008
      • 19

      #3
      Thank you.
      Your solution me has been very useful and works correctly.
      Again, thank you

      Comment

      • Sir_Yaro
        Member
        • Nov 2008
        • 37

        #4
        Thats was I was looking for! Thank you tighep VERY much!

        Comment

        • gospodin.horoshiy
          Senior Member
          • Sep 2008
          • 272

          #5
          Hi, I believe that line has moved as zabbix development progressed. Could anyone tell what was the complete query? I tried to modify this part:

          /* select all triggers linked to hosts */
          if (!empty($elements['hosts']) && !empty($elements['triggers']))
          $cond = '('.DBcondition('h.hostid', $elements['hosts']).
          ' or '.DBcondition('t.triggerid', $elements['triggers']).')';
          else if (!empty($elements['hosts']))
          $cond = DBcondition('h.hostid', $elements['hosts']);
          else if (!empty($elements['triggers']))
          $cond = DBcondition('t.triggerid', $elements['triggers']);
          else
          return '0';


          $cnt = 0;
          $sql = 'SELECT DISTINCT t.triggerid '.
          ' FROM triggers t,functions f,items i,hosts h '.
          ' WHERE t.triggerid=f.triggerid '.
          ' AND f.itemid=i.itemid '.
          ' AND i.hostid=h.hostid '.
          ' AND i.status='.ITEM_STATUS_ACTIVE.
          ' AND h.status='.HOST_STATUS_MONITORED.
          ' AND t.status='.TRIGGER_STATUS_ENABLED.
          ' AND t.value='.TRIGGER_VALUE_TRUE.
          'AND '.$cond;

          $db_triggers = DBselect($sql);
          while($db_trigger = DBfetch($db_triggers)){
          $sql = 'SELECT eventid,value,acknowledged '.
          ' FROM events'.
          ' WHERE object='.EVENT_OBJECT_TRIGGER.
          ' AND objectid='.$db_trigger['triggerid'].
          'ORDER BY eventid DESC';
          $db_events = DBselect($sql, 1);
          if($db_event= DBfetch($db_events))
          if(($db_event['value'] == TRIGGER_VALUE_TRUE) && ($db_event['acknowledged'] == 0)){
          $cnt++;
          }
          }

          return $cnt;
          }
          but it's not working
          Zbx 2.0.4 on Debian and MYSQL5 on Ubuntu Server 64bit 8.04,
          200+ Win Agents, 50+ Linux Agents, 150+ Network Devices

          Comment

          • claytondias
            Junior Member
            • Apr 2007
            • 4

            #6
            but it's not working

            Comment

            Working...