[ZBX-5439] Lost triggers in Triggers Page never get resolved Created: 2012 Aug 11  Updated: 2017 May 30  Resolved: 2012 Aug 29

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.0.1, 2.0.2
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: LEONARDO H. MACHADO Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS release 6.2 (Final) on VM


Attachments: PNG File 2012-08-10_1837.png     PNG File 2012-08-10_1839.png    

 Description   

I have 2 triggers in my Triggers page that seems to be somenthing that zabbix has no reference about.
It happend somewhere in past, while I was doing some teste and now the triggers never get out of my Triggers view.

Please, how to I remove those triggers from Triggers page?

I have attached images and below you can see the message I get when I right click the trigger and select "Event".

--------------
Undefined index: groups [include/classes/class.cpagefilter.php:245]array_keys() expects parameter 1 to be array, null given [include/classes/class.cpagefilter.php:252]reset() expects parameter 1 to be array, null given [include/classes/class.cpagefilter.php:253]pg_query(): Query failed: ERROR: invalid input syntax for integer: ""
LINE 1: ...h.hostid,h.host FROM hosts h WHERE (h.hostid IN ('')) AND ...
^ [include/db.inc.php:430]Error in query [SELECT h.hostid,h.host FROM hosts h WHERE (h.hostid IN ('')) AND h.hostid BETWEEN 000000000000000 AND 099999999999999 AND h.status IN (0,1,3)] [ERROR: invalid input syntax for integer: ""
LINE 1: ...h.hostid,h.host FROM hosts h WHERE (h.hostid IN ('')) AND ...
^]pg_fetch_assoc() expects parameter 1 to be resource, boolean given [include/db.inc.php:565]pg_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:566]pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [include/db.inc.php:430]Error in query [SELECT DISTINCT g.groupid,hg.hostid FROM groups g,hosts_groups hg WHERE g.groupid BETWEEN 000000000000000 AND 099999999999999 AND 1=0 AND hg.groupid=g.groupid] [ERROR: current transaction is aborted, commands ignored until end of transaction block]pg_fetch_assoc() expects parameter 1 to be resource, boolean given [include/db.inc.php:565]pg_free_result() expects parameter 1 to be resource, boolean given [include/db.inc.php:566]



 Comments   
Comment by Oleksii Zagorskyi [ 2012 Aug 11 ]

Were those triggers generated by LLD ?
See also ZBX-5218 and ZBX-5148 just in case.

Who started to use 2.0.0 and 2.0.1 I see only one way - delete those triggers manually from the DB.
Or if it's possible then recreate the fresh DB from the scratch.
IMO

Comment by LEONARDO H. MACHADO [ 2012 Aug 13 ]

And how is the query to remove an active lost trigger? I know SQL, but I have no idea where this trigger is in the Database and if there is any constraint that I must respect.

Comment by Alexei Vladishev [ 2012 Aug 29 ]

I believe these two SQL statements will fix your problem:

delete from triggers where triggerid not in (select triggerid from functions);
delete from events where source=0 and object=0 and objectid not in (select triggerid from triggers);

Feel free to re-open this issue if it doesn't help.

Generated at Sat Apr 12 08:45:33 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.