Ad Widget

Collapse

Creating a trigger that reference a value from a linked template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • driscoll
    Junior Member
    • Sep 2024
    • 10

    #1

    Creating a trigger that reference a value from a linked template

    Hi there - sorry for the cryptic title

    I am building a template that ideally will monitor everything related to a particular application stack.
    Among other things, I need to ensure that a particular docker container is running. So, to avoid reinventing the wheel, I linked the "Docker by zabbix agent 2" in my template, which provides such thing.

    Now, my problem is: how can I create a trigger expression on my custom template, which reference the aforementioned linked docker template? I want to do it on my custom template so make it easily reusable on my hosts.

    I tried:
    Code:
    last(/my-template/docker.container_info.state.status["/infra-frontend"])<>"running"
    ... but I keep getting "Incorrect item key ..."

    Any idea?
  • driscoll
    Junior Member
    • Sep 2024
    • 10

    #2
    Any help please?

    Comment

    • usmanrafiq
      Junior Member
      • Nov 2024
      • 2

      #3
      I have same question

      Comment

      • dever
        Junior Member
        • Feb 2025
        • 1

        #4
        I have a similar question, I wanted to reuse the Items defined in the "FreeBSD by Zabbix Agent" template. The only way I found to do this was to link "FreeBSD by Zabbix Agent" to my template, let's call it "My Stuff". Then in "My Stuff" I had to create the Items my trigger would use which were already defined in the parent "FreeBSD by Zabbix Agent". Then I could reference the keys in those itemes with a path as follows.

        My Stuff/system.swap.size[,pfree]

        The motivation was to put keep site specific triggers confined to a template so that template updates for the parrent would be eaiser.

        It seems overly complicated to have to do this, but it's the only way to use the a key that's already been defined in another template when a host is assigned to that parent template.

        I joined the forums to try to find out if there is a better way.




        Comment

        Working...