Ad Widget

Collapse

Template linking

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • demoss
    Junior Member
    • Oct 2018
    • 9

    #1

    Template linking

    I'm trying to work something out with template linking and I need a little help. I'm running Zabbix 4.2.6.

    Here's my basic scenario. I have a base template that gets applied during autoregistration to all hosts with basic items and triggers. What I would like to be able to do is define certain groups of hosts for particular applications that have additional triggers based on the items defined in that base template. Essentially, we collect the data on all hosts, but only some applications want to be notified if their CPU goes high, for instance. I tried the obvious way of simply referring to the keys in the base template while creating them in the application template, but that doesn't work; the triggers appear then in the base template as well.

    It seems that I can do it in simpler cases by having those application templates link the base template and then remove the base template and apply the application template INSTEAD (which is already a little ugly, but if it works, great). Example:

    HostA -> AppA template -> Base template
    HostB -> AppB template -> Base template

    And as long as I don't get too complicated, this works, BUT... when the application decides they want both AppA and AppB templates applied to the same host (say they're really sub parts of an application, one host of which has both parts), it doesn't work, because now Base is linked in twice and Zabbix won't allow that.

    Is there any way around that other than to write a separate template, AppAB, that combines the triggers of both AppA and AppB?

    On a related note, is there any good reason why Zabbix doesn't allow me to link in the SAME template twice this way? I understand that the keys themselves can't be duplicated, but there seems a reasonable use case here for simply ensuring that they're present so that you can then write additional triggers based on those keys.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    You himself on all answered. And correct work around described.

    Comment

    Working...