Ad Widget

Collapse

Zabbix 3.0 dependencies

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rubendob
    Member
    • Apr 2012
    • 36

    #1

    Zabbix 3.0 dependencies

    Hi

    I know this is a very common topic. I 've also read lots of blogs, post on this forum but still don't know what to do.

    I need to make some dependencies between templates to avoid typical scenario when:

    a. one host with different templates linked like HTTP,MYSQL,LINUX,ICMPING
    b. one host goes downs
    c. every enabled trigger changes to problem due to lack of responde from the killed host
    d. you start to get hundred of alerts

    I thought will be easy to make just some dependency between templates. Let's say we have one host with ICMPING and template for SSH.

    Host goes down so SSH trigger changes to problem but also the ICMPING.

    What I did (or was I tried to do) was to modify the SSH trigger:

    Code:
    SSH service is down on {HOST.NAME}
    and added a dependency with the other template like:

    Code:
    Template ICMP Ping: {HOST.NAME} is unavailable by ICMP
    with this result:

    Code:
    "Cannot add dependency from a host to a template."
    The only way to do that was setup manually the individual trigger inside host available triggers and modify it manually. But then I'm going kind of lacking ability to make mass updates because every trigger is "unique".
    How you achieve come behave? Any thoughts?
    Thanks
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #2
    I think what you want is to add the dependencies between templates not between a host and a template.

    I've got most of the service type templates I use with dependencies to ping.

    Note you also need to consider the triggers and intervals, as the dependency doesn't work if they fire out of order, e.g. if ping polls at 60 seconds and ssh polls at 60 seconds and both fire on first failure, you stand a good chance that SSH will fire first with random polling. One way around is make ping fall faster than anything else, e.g. everything else waits 3 minutes or some such.

    Comment

    • rubendob
      Member
      • Apr 2012
      • 36

      #3
      HI Linwood,

      in fact what I want is to link triggers between templates!

      Let me explain. I have two templates:

      - Template ICMP PING with N triggers
      - Template HTTP with N triggers

      then I have one host with two of these templates linked. If host goes down, every trigger available changes status to PROBLEM.

      so what I tried to do was go to Configuration>Templates>Template HTTP. Then I edited the trigger called "HTTP service is down on {HOST.NAME}" to add a dependency with the trigger called "{HOST.NAME} is unavailable by ICMP" which is a trigger located in the Template ICMPING

      but when I did that I got a message like:

      ""Cannot add dependency from a host to a template."

      so two things:

      a) why zabbix complaints about host? I'm not doing that,am I?
      b) which is the right way to do that? Because only option I see now is to have a kind of very BIG template which is the sum of multiple templates and then have the all dependencies in one very big Template which is something that I don't like.

      Thanks

      Comment

      • Linwood
        Senior Member
        • Dec 2013
        • 398

        #4
        I wonder if the error message itself is the issue.

        Check if you have any hosts in the HTTP template list which are not in the ICMP template list.

        That won't work if so. As you change the HTTP template, that change (as you save it) is copied out to every host with HTTP template in it, and creates that dependency. If you have even one host with the HTTP template which lacks the ICMP template, when it goes to save that dependency, it will fail, and in doing so fail the entire template change. I would have expected a different error perhaps, but that's the most likely cause.

        That's my guess of the underlying issue. I do what you describe all the time, it's fine in concept.

        With very rare exception I just add icmp to every host all the time. If that's acceptable, that's the quickest way to tell if my theory is true -- just stick all hosts into the icmp template and then try again with the dependency.

        Comment

        • rubendob
          Member
          • Apr 2012
          • 36

          #5
          Originally posted by Linwood
          I wonder if the error message itself is the issue.

          Check if you have any hosts in the HTTP template list which are not in the ICMP template list.

          That won't work if so. As you change the HTTP template, that change (as you save it) is copied out to every host with HTTP template in it, and creates that dependency. If you have even one host with the HTTP template which lacks the ICMP template, when it goes to save that dependency, it will fail, and in doing so fail the entire template change. I would have expected a different error perhaps, but that's the most likely cause.

          That's my guess of the underlying issue. I do what you describe all the time, it's fine in concept.

          With very rare exception I just add icmp to every host all the time. If that's acceptable, that's the quickest way to tell if my theory is true -- just stick all hosts into the icmp template and then try again with the dependency.
          Hi!

          You were right. What I did was

          1. clean old dependencies
          2. unlink templates
          3. back to kind of clean status

          then I setup dependencies between TRIGGERS (caution, not linking templates between them) for example

          template HTTP trigger HTTP is down -> Depends on template ICMP trigger Host is down

          right after that I added the HTTP template to all web hosts. Then I tried to shutdown completely the hosts to check that I just get one email not two or more.

          Works ok.

          I don't if I'm doing fine but seems to woork.

          Thanks for comment !

          Comment

          Working...