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

Trigger status not changed after template update and linking with autoregistration

XMLWordPrintable

    • Sprint 84 (Jan 2022), Sprint 85 (Feb 2022)
    • 0.5

      Steps to reproduce:

      1. Create template with trigger. Trigger status - Enabled.
      2. Create Autoregistration Action with operation - link to templates. (link to template, created before)
      3. Wait host to be created with item and trigger from template. 
      4. check trigger - status enabled. 
      5. Unlink template from created host (simply - Unlink).
      6. In template, change Trigger status to - Disabled. 
      7. In zabbix_agentd.conf file, change HostMetadata value to anything. 
      8. Restart zabbix agent. 
      9. Wait until template will be linked to created before host.
      10. Check triggers status.

      Result:
      Status is still - Enabled. Same for trigger prototype. 

      Logs:

      294082:20210705:160231.129 In DBcopy_template_triggers()
      294082:20210705:160231.129 query [txnlev:1] [select distinct t.triggerid,t.description,t.expression,t.status,t.type,t.priority,t.comments,t.url,t.flags,t.recovery_expression,t.recovery_mode,t.correlation_mode,t.correlation_tag,t.manual_close,t.opdata,t.discover,t.event_name from triggers t,functions f,items i where t.triggerid=f.triggerid and f.itemid=i.itemid and i.hostid=21]
      
      294082:20210705:160231.130 query [txnlev:1] [select distinct t.triggerid,t.expression,t.recovery_expression from triggers t,functions f,items i where t.triggerid=f.triggerid and f.itemid=i.itemid and t.templateid is null and i.hostid=22 and t.description='trigger1']
      
      294082:20210705:160231.131 query [txnlev:1] [select f1.functionid,f2.functionid from functions f1,functions f2,items i1,items i2 where f1.name=f2.name and f1.parameter=f2.parameter and i1.key_=i2.key_ and i1.itemid=f1.itemid and i2.itemid=f2.itemid and f1.triggerid=30 and f2.triggerid=31]
      
      294082:20210705:160231.131 query [txnlev:1] [update triggers set templateid=30,flags=0,recovery_mode=0,correlation_mode=0,correlation_tag='',manual_close=1,opdata='',discover=0,event_name='' where triggerid=31;
      ]
      
      294082:20210705:160231.132 query [txnlev:1] [delete from trigger_tag where triggerid=31]
      
      294082:20210705:160231.132 query [txnlev:1] [select t.triggerid,tt.tag,tt.value from trigger_tag tt,triggers t where tt.triggerid=t.templateid and t.triggerid=31]
      
      294082:20210705:160231.132 End of DBcopy_template_triggers():SUCCEED

      Expected:
      Should be - Disabled. 

            ak Andrejs Kozlovs
            smaklakovs Sergejs Maklakovs
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: