Ad Widget

Collapse

Templates with the same discovery rule.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amish1975
    Junior Member
    • Jul 2013
    • 14

    #1

    Templates with the same discovery rule.

    Zabbix 2.4.4 (latest).

    Trying to separate one template into 2 parts ("basic" and "extra") to avoid unnecessary (extra) counters gathering while server is not engaged in production (and in the same time to keep basic monitoring).

    Creating 2 templates "basic" and "extra". For both templates would like to use "Mounted filesystem discovery" (based on "vfs.fs.discovery" key), but to create absolutely different key (and graphs and trigger) prototypes.

    However, when I try to apply both templates to the same host, I get error:
    "Template "extra" with item key "vfs.fs.discovery" already linked to host."

    This is quite a strange restriction - based not on value key, but on discovery key. I cannot easily invent relevant workaround, I guess this is not a correct behaviour.
  • amish1975
    Junior Member
    • Jul 2013
    • 14

    #2
    Openned an issue:

    Comment

    • ingus.vilnis
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Mar 2014
      • 908

      #3
      Hi,

      Zabbix does not allow multiple items with same key on one host. There is no difference if you talk about item key or discovery (it is basically the same item).

      In your case it is not practical to have discovery rules on both templates. Create them in such way that they do not overlap and then use basic template for all hosts. When required you also apply extra template which extends the monitoring for hosts in production.

      Best Regards,
      Ingus

      Comment

      • amish1975
        Junior Member
        • Jul 2013
        • 14

        #4
        Hi, Ingus, Thanks for your reply!

        I expected that the route of the problem is the constraint which should guarantee the uniqueness of couple "host" & "key" regardless of what kind of "key" is it.

        Your workaround is not applicable as it contradicts the usecase. I have a few discovered case in "basic" template which should be discovered and monitored on every first host. In the same time, I have enormous "second priority" keys which should be discovered based on the same discovery rule and engaged only during "deep inspection" and disengaged afterwards. These keys are grouped within "enhanced" template.

        The real workaround is to inherit discovery rule by linking "basic" template in "enhanced" template and by creating extra keys in "enhanced" template... And then to apply "basic" OR "enchanced" template. It was initially done.

        But this workaround will NOT help when you need to create two or more different templates with different number of keys in it and apply several of them to the unique host... Myself I consider it as a serious restriction...

        Regards,
        Alexey

        Comment

        Working...