Ad Widget

Collapse

Triggers, Templates and Discovery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • untergeek
    Senior Member
    Zabbix Certified Specialist
    • Jun 2009
    • 512

    #1

    Triggers, Templates and Discovery

    Solaris 10, MySQL 5.1, Zabbix 1.8, today's frontend (revision 8986).

    I have recreated everything and it still does this so I know it's not just me. I have a pile of templates, discovery rules and actions and for some strange reason SOME of my triggers get duplicated when I use the discovery action "link to template"

    The irritating thing is that it's not every trigger, just some of them. The ones that are duplicated are duplicated on EVERY host the template is linked to. It's multiple templates that do this, too.

    Further investigation reveals the following:
    1. If I use the host page to unlink and clear, then relink the template there are no duplicates.
    2. If I use the template page to unlink and relink I it sometimes comes back clean, but other times I get orphaned duplicate triggers not associated with the template which I can then delete.
    3. There's a bug in the link to template dialog in the host screen in that EVERY template that's not already assigned (which means they're greyed out) is pre-selected. There is no select all or deselect all in the pop-up. This is very annyoing.
    So, why does it do this? I can't presume it's all in the front-end since it happens as part of discovery.
  • untergeek
    Senior Member
    Zabbix Certified Specialist
    • Jun 2009
    • 512

    #2
    I might also mention that I don't have this problem with an Oracle backend. Perhaps it's query formatting?

    Code:
    Zabbix error Z3005: 
    
      12744:20091230:163232.734 [Z3005] Query failed: [1062] Duplicate entry '10074-10044' for key 'hosts_templates_1' [insert into hosts_templates (hosttemplateid, hostid, templateid) values (358,10074,10044)]
    Last edited by untergeek; 31-12-2009, 01:00. Reason: Including error code

    Comment

    • untergeek
      Senior Member
      Zabbix Certified Specialist
      • Jun 2009
      • 512

      #3
      I have found a bug!!!



      Link to template via Discovery Action. If there are triggers with multiple conditions (i.e. logical OR/AND/etc.) the trigger is duplicated on the target host.

      If I have {hostname:system.cpu.util[all,idle].count(#5,10,"le")}=5 I have no problems.

      If however I have ({hostname:ntp.offset.count(#5,5,"gt")}=5)|({hostn ame:ntp.offset.count(#5,-5,"lt")}=5) with the logical OR, this trigger gets added to the host 2x by the auto-discovery action executing the link to template.

      Logical ANDs do the same thing.

      The crazy thing is that if I manually add the template it adds fine.

      Comment

      Working...