[ZBX-5218] Editing trigger prototype expression for already discovered triggers is generating orphaned triggers Created: 2012 Jun 20 Updated: 2017 May 30 Resolved: 2012 Jun 21 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.0.0, 2.1.0 |
Fix Version/s: | 2.0.2rc1, 2.1.0 |
Type: | Incident report | Priority: | Blocker |
Reporter: | Oleksii Zagorskyi | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | events, lld, orphaned, trigger | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: | orphaned_triggers_zabbix_server.log | ||||||||
Issue Links: |
|
Description |
We have one poller configured to simplify debugging, discovery rule update interval - 60 seconds. Short scenario is:
...
23079:20120620:143154.400 query [txnlev:1] [insert into functions (functionid,itemid,triggerid,function,parameter) values (15207,26700,221169,'last','0'),(15208,26701,221170,'last','0'); <5',priority=2,comments='',url='',type=0,flags=4 where triggerid=221169; delete from functions where triggerid=221169; update triggers set description='Free disk space is less than 10% on volume D: ',expression='{15208}<5',priority=2,comments='',url='',type=0,flags=4 where triggerid=221170; update trigger_discovery set name='Free disk space is less than 10% on volume {#FSNAME} ' where triggerid=221170 and parent_triggerid=221158;
23079:20120620:143254.432 query [txnlev:1] [insert into triggers (triggerid,description,expression,priority,status,comments,url,type,value,value_flags,flags,error) values (221171,'Free disk space is less than 10% on volume C: <5',2,0,'','',0,0,1,4,'Trigger just added. No status update so far.'),(221172,'Free disk space is less than 10% on volume D: <5',2,0,'','',0,0,1,4,'Trigger just added. No status update so far.'); '); Note that between two discovery executions there are NO visible and working triggers for the host(s) !!! In the result we have orphaned triggers (which were before) in the DB (triggers without functions) and if those triggers generated events - it will be visible in the events page if select All for host groups and hosts. In the attachment you can see all these queries with all related parts with DebugLevel=4 To find such triggers here is a simple SQL: To delete orphaned event (if they are) and triggers here is two simple SQLs (order is important): |
Comments |
Comment by Oleksii Zagorskyi [ 2012 Jun 20 ] |
(1) Note - in every production DB there is one such WEB trigger which came from data.sql <Sasha> RESOLVED in r28388. (WEB trigger removed from data.tmpl) <richlv> including the frontend ? wouldn't it bork up something like trigger count somewhere (monitoring, config...) or anything else ? |
Comment by Oleksii Zagorskyi [ 2012 Jun 20 ] |
(2) Please check also behavior of discovered graphs for similar cases. Maybe there is also something that should/could be improved? <Sasha> WON'T FIX graphs works as expected |
Comment by Alexander Vladishev [ 2012 Jun 21 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-5218 |
Comment by dimir [ 2012 Jun 22 ] |
Successfully tested! |
Comment by dimir [ 2012 Jun 25 ] |
Fix assignee. |
Comment by dimir [ 2012 Jun 29 ] |
Fixed in pre-2.0.2 r28566, pre-2.1.0 r28567. |
Comment by Oleksii Zagorskyi [ 2012 Jul 03 ] |
Just small conclusion of this fix. With this fix server is doing the same - after next discovery it recreates just trigger functions, without changing IDs of discovered triggers. That's fine because we can use discovered triggers in action conditions and do not afraid that they will be deleted (as condition of course) after changing the expression in the prototype. THANKS! |