Hi everyone,
I would like to have your opinion about the following work around for updating trigger status to OK after a manual acknowledgement in Zabbix GUI:
What I do is to automatically run a script every two minutes (cron table of Zabbix Server, where the DB is installed too), that update field "value" of table triggers:
update triggers set value=0,error=''
where triggerid in (
select ee.objectid from events ee
inner join
(select objectid,MAX(eventid) as maxid
from events
group by objectid)
ee2 on ee.objectid=ee2.objectid and ee.eventid=ee2.maxid
where
ee.acknowledged=1)
and value=1
I could add control by chosing the "items type" for which I want the item to be updated (for instance, apply the change only for triggers linked to items of type 'SNMP trap')
What do you think of it?
Any better Idea?
regards,
Simon
I would like to have your opinion about the following work around for updating trigger status to OK after a manual acknowledgement in Zabbix GUI:
What I do is to automatically run a script every two minutes (cron table of Zabbix Server, where the DB is installed too), that update field "value" of table triggers:
update triggers set value=0,error=''
where triggerid in (
select ee.objectid from events ee
inner join
(select objectid,MAX(eventid) as maxid
from events
group by objectid)
ee2 on ee.objectid=ee2.objectid and ee.eventid=ee2.maxid
where
ee.acknowledged=1)
and value=1
I could add control by chosing the "items type" for which I want the item to be updated (for instance, apply the change only for triggers linked to items of type 'SNMP trap')
What do you think of it?
Any better Idea?
regards,
Simon
Comment