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

All trigger macros are expanded on Configuration and Monitoring of IT Services

XMLWordPrintable

      For example, we have only 7 triggers in PROBLEM status on Monitoring->IT services page, but frontend tries to expand all possible macros for each trigger (depends on amount items used in trigger expression):

      SQL (0.004958): SELECT f.triggerid,f.functionid,h.host,h.name FROM functions f JOIN items i ON f.itemid=i.itemid JOIN hosts h ON i.hostid=h.hostid WHERE (f.functionid BETWEEN '1180813' AND '1180820' OR f.functionid BETWEEN '1180822' AND '1180830' OR f.functionid BETWEEN '1180832' AND '1180840' OR f.functionid IN ('353231','353264','369157','369158','393157','400419','402495','403102','403110','404541','467538','509791','509803','602355','643406','643408','643413','643414','643416','649445','664784','664790','664793','664796','664808','664811','664814','664817','664820','664823','664829','664838','664841','664844','664847','664868','664871','664874','664877','664880','664883','664886','664889','664892','664898','664901','664907','664910','664916','664925','668633','671243','671261','671279','671297','671315','684293','692082','692101','692120','692139','692158','695058','695060','695067','695069','701104','701110','701111','709714','717576','717597','731519','731629','741876','745553','745584','745950','755256','756443','758354','758736','772737','772739','772742','772743','772744','809869','814771','818531','818976','819890','821984','826999','842068','842386','884921','889722','975294','977394','1106776','1106782','1106785','1106788','1106794','1106797','1106800','1106803','1106809','1106812','1106815','1106818','1106821','1106824','1106827','1106830','1106836','1106839','1106842','1106845','1106848','1106851','1106854','1106857','1106860','1106866','1106869','1106872','1106875','1106878','1106881','1106884','1106887','1106890','1106893','1106905','1180803','1180804','1180805','1180806','1180808','1180809','1180810','1180811','1180845'))
      srv_status.php:108 ? CMacrosResolverHelper::resolveTriggerNames() ? CMacrosResolver->resolve() ? CMacrosResolver->resolveTrigger() ? CMacrosResolverGeneral->getHostMacros() ? DBselect() in /var/www/zbx/trunk/2.2.6/include/classes/macros/CMacrosResolverGeneral.php:337
      
      
      SQL (0.003315): SELECT f.triggerid,f.functionid,i.itemid,i.value_type,i.units,i.valuemapid FROM functions f JOIN items i ON f.itemid=i.itemid JOIN hosts h ON i.hostid=h.hostid WHERE (f.functionid BETWEEN '1180813' AND '1180820' OR f.functionid BETWEEN '1180822' AND '1180830' OR f.functionid BETWEEN '1180832' AND '1180840' OR f.functionid IN ('370293','371640','403102','403110','404541','509791','509803','650349','664784','664790','664793','664796','664808','664811','664814','664817','664820','664823','664829','664838','664841','664844','664847','664868','664871','664874','664877','664880','664883','664886','664889','664892','664898','664901','664907','664910','664916','664925','671243','671261','671279','671297','671315','672153','692082','692101','692120','692139','692158','717576','717597','1091554','1091556','1091557','1106776','1106782','1106785','1106788','1106794','1106797','1106800','1106803','1106809','1106812','1106815','1106818','1106821','1106824','1106827','1106830','1106836','1106839','1106842','1106845','1106848','1106851','1106854','1106857','1106860','1106866','1106869','1106872','1106875','1106878','1106881','1106884','1106887','1106890','1106893','1106905','1180803','1180804','1180805','1180806','1180808','1180809','1180810','1180811','1180845'))
      srv_status.php:108 ? CMacrosResolverHelper::resolveTriggerNames() ? CMacrosResolver->resolve() ? CMacrosResolver->resolveTrigger() ? CMacrosResolverGeneral->getItemMacros() ? DBselect() in /var/www/zbx/trunk/2.2.6/include/classes/macros/CMacrosResolverGeneral.php:295
      
      
      SQL (0.001069): SELECT * FROM history h WHERE h.itemid='560213' ORDER BY h.clock DESC LIMIT 1 OFFSET 0
      srv_status.php:108 ? CMacrosResolverHelper::resolveTriggerNames() ? CMacrosResolver->resolve() ? CMacrosResolver->resolveTrigger() ? CMacrosResolverGeneral->getItemMacros() ? CHistoryManager->getLast() ? DBselect() in /var/www/zbx/trunk/2.2.6/api/classes/managers/CHistoryManager.php:46
      
      
      SQL (0.001295): SELECT * FROM history_uint h WHERE h.itemid='629817' ORDER BY h.clock DESC LIMIT 1 OFFSET 0
      srv_status.php:108 ? CMacrosResolverHelper::resolveTriggerNames() ? CMacrosResolver->resolve() ? CMacrosResolver->resolveTrigger() ? CMacrosResolverGeneral->getItemMacros() ? CHistoryManager->getLast() ? DBselect() in /var/www/zbx/trunk/2.2.6/api/classes/managers/CHistoryManager.php:46
      

      The same behavior on Configuration->IT services page, it is configuration page so frontend should not expand any macros from history (and maybe all of them) at all.

            Unassigned Unassigned
            dotneft Alexey Pustovalov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: