Ad Widget

Collapse

Error creating triggers dependency

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lomiranda
    Junior Member
    • Feb 2014
    • 2

    #1

    Error creating triggers dependency

    Hi,

    I have two templates and both have triggers. Zabbix documentation says that it's possible to create a dependency between triggers of different templates, and I'd like to create one, but Zabbix shows an error like this:

    Cannot add dependency from a host to a template.

    Both templates are in the same group (Templates). I have made some tests and I concluded that triggers with macros like {HOST.HOST} can't be linked to triggers of another template, but I'm not so sure.
    Anyone could help me?
  • Starko
    Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Aug 2012
    • 93

    #2
    I have the same Problem. Wanted to link two default templates.
    I want to make "Zabbix agent on {HOST.NAME} is unreachable for 5 minutes" dependent of "Ping Check Failed on {HOST.NAME}"
    Doensn't work and fails with: "Cannot add dependency from a host to a template."

    Any idea?

    Comment

    • aib
      Senior Member
      • Jan 2014
      • 1615

      #3
      Sorry, it works like it says.
      You cannot add a dependence between templates.

      You have to use the real hosts/items/triggers to create dependencies.
      Sincerely yours,
      Aleksey

      Comment

      • Starko
        Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Aug 2012
        • 93

        #4
        Originally posted by aib
        Sorry, it works like it says.
        You cannot add a dependence between templates.

        You have to use the real hosts/items/triggers to create dependencies.
        That is not true. I have done this before. See my screenshot. It works tor the Windows OS Template.
        My problem ist, that it does not work for the Linux OS Template.
        Attached Files
        Last edited by Starko; 14-05-2014, 10:37.

        Comment

        • aib
          Senior Member
          • Jan 2014
          • 1615

          #5
          You are right
          • Trigger dependency may be added from any host trigger to any other host trigger, as long as it wouldn't result in a circular dependency.
          • Trigger dependency may be added from a template to a template. If a trigger from template A depends on a trigger from template B, template A may only be linked to a host (or another template) together with template B, but template B may be linked to a host (or another template) alone.
          • Trigger dependency may be added from template trigger to a host trigger. In this case, linking such a template to a host will create a host trigger that depends on the same trigger template trigger was depending on. This allows to, for example, have a template where some triggers depend on router (host) triggers. All hosts linked to this template will depend on that specific router.
          • Trigger dependency from a host trigger to a template trigger may not be added.
          Sincerely yours,
          Aleksey

          Comment

          • wasabi
            Member
            • Mar 2014
            • 30

            #6
            trigger dependency works partially...why?

            I have the same problem as Starko has:

            "I have the same Problem. Wanted to link two default templates.
            I want to make "Zabbix agent on {HOST.NAME} is unreachable for 5 minutes" dependent of "Ping Check Failed on {HOST.NAME}"
            Doensn't work and fails with: "Cannot add dependency from a host to a template."
            "

            - "windows zabbix agent is unavailable" template trigger depends on "icmp unreachable" template trigger ->works!
            - "linux zabbix agent is unavailable" template trigger depends on "icmp unreachable" template trigger ->does not work!

            Error is: Cannot add dependency from a host to a template.

            Why does this work for only one of 2 cases? Any suggestion?

            Thank you in advance...

            Comment

            • aib
              Senior Member
              • Jan 2014
              • 1615

              #7
              Hmm...
              Right now I created dependence rule between "Template App Zabbix Agent" trigger and "Template ICMP Ping"
              Attached Files
              Sincerely yours,
              Aleksey

              Comment

              • Starko
                Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Aug 2012
                • 93

                #8
                You are right, it makes much more sense to use the template "Template App Zabbix Agent" as a source for the dependency. I didn't had this idea so far. Thank you for that!

                But it still doesn't work for me ;(



                Which version do you use?

                Comment

                • aib
                  Senior Member
                  • Jan 2014
                  • 1615

                  #9
                  Please, check your configuration.
                  It looks like you already linked one template (Template Zabbix Agent) but didn't link the second template (Template ICMP ping) to some hosts.

                  Both templates, where triggers have dependencies, have to be linked to the same host.

                  In your case you get the error message "Cannot add dependency from host to template"
                  Sincerely yours,
                  Aleksey

                  Comment

                  • Starko
                    Member
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Aug 2012
                    • 93

                    #10
                    Hello, i understand your point, but I thin i checked everything twice. I find no hosts with the linux template, that do not have the ICMP template linked.

                    Do you have a suggestion in which view in the frontend i can search for this error? i did it all one by one, and i cant guarantee i made no errors.

                    Perheps i would solve the problem, if i link the ICMP template to the linux os template?

                    Comment

                    • timp
                      Junior Member
                      • Sep 2016
                      • 1

                      #11
                      Old thread, but there does not seem to be an answer.

                      I was able to create the dependency only after linking the 2nd template to the template that contains the trigger for the dependency.

                      Comment

                      • Sun21
                        Junior Member
                        • Oct 2016
                        • 4

                        #12
                        Have the same problem:
                        Adding template trigger to Dependencies of other template trigger.
                        Error: "Cannot add dependency from a host to a template."

                        How to check what host is causing the error?

                        Comment

                        • Alfista
                          Senior Member
                          • Mar 2017
                          • 136

                          #13
                          Hi I try the same.
                          Will add dependency to App Zabbix Agent on Ping. Both are connected to the same hosts, Only Zabbix Agent ic connected to more hosts.
                          Can this be the problem?

                          Thanks.

                          Comment

                          • kloczek
                            Senior Member
                            • Jun 2006
                            • 1771

                            #14
                            Originally posted by aib
                            Sorry, it works like it says.
                            You cannot add a dependence between templates.

                            You have to use the real hosts/items/triggers to create dependencies.
                            That is not entirely truth.
                            You can create dependencies between triggers of template A and B but only if those templates are linked into another template C.
                            Dependency in such case can be defined in Template C.
                            http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                            https://kloczek.wordpress.com/
                            zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                            My zabbix templates https://github.com/kloczek/zabbix-templates

                            Comment

                            Working...