Ad Widget

Collapse

Configuring triggers to share dependencies between them

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chechu
    Junior Member
    • Mar 2014
    • 6

    #1

    Configuring triggers to share dependencies between them

    Hello,

    We are setting up a monitoring in a balancer side and we are configuring one item per each server included in the pool, for example:

    POOL: website1

    In website1 pool there're 4 servers:

    server1
    server2
    server3
    server4

    And each server has 1 item and 1 trigger configured

    We need to set up one unique trigger that events following this logic:

    serverX in the pool website1 is not reachable -> raises a warning trigger
    serverX in the pool website1 is not reachable -> raises a high trigger
    serverX in the pool website1 is not reachable -> raises a Disaster trigger

    It doesn't matter which server is not reachable, the idea is to set up 3 levels of criticity depending the number of hosts that are not reachable:

    1 server in the pool not reachable -> warning
    2 servers in the pool not reachable -> High
    3 servers in the pool not reachable -> Disaster


    Does any1 has already faced this logic and knows a way to perform it?

    Thanks in advance and best regards.

    Chechu.
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    You may want to have a look at Zabbix' group functions.

    Comment

    • chechu
      Junior Member
      • Mar 2014
      • 6

      #3
      Hello,

      Thanks for your reply, but this won't fit our necessities since we receive the item(s) status via zabbix_sender.

      We have a zabbix monitoring all our systems (local), but there's a third party that provide us load balancing and they send us the status of the load balancing (items) via zabbix_sender.

      They monitor the load balancing status directly from F5 and as soon as there's a host not reachable in the pool (the service is still OK but in the pool there're 3/4 acive hosts), a zabbix_sender is triggered and sent to us, we receive the item status and we process it.

      All the logic, then, should be put in the trigger configuration. I was thinking something similiar to this, talking in pseudocode:

      if trigger1.value=0 and trigger2.value=1 and trigger3.value=1 and trigger4.value=1 then
      trigger.severity -> DISASTER

      if trigger1.value=1 and trigger2.value=0 and trigger3.value=1 and trigger4.value=1 then
      trigger.severity -> DISASTER

      if trigger1.value=1 and trigger2.value=1 and trigger3.value=0 and trigger4.value=1 then
      trigger.severity -> DISASTER

      if trigger1.value=1 and trigger2.value=1 and trigger3.value=1 and trigger4.value=0 then
      trigger.severity -> DISASTER

      It's something like covering all possiblities and convinations of the triggers status as long as there's 1 of them active -> Warning, 2 of them -> High, 3 of them -> Disaster. That's why I thought about dependencies, but we can't since we need to know the order of the servers that will be down and obviuosly we can't :/

      Thanks again,

      Chechu.

      Comment

      • steveboyson
        Senior Member
        • Jul 2013
        • 582

        #4
        I think I got it. Nevertheless, I don't think that the grpsum* functions are bundled with "zabbix agent" items only. I would think it has to work with trapper items as well.

        So: if you have a group of servers, the groupfunc function evaluates values from the whole group.
        I would define different triggers depending on the number of failed hosts.

        But what if you try some calculated items?
        You could define 3 triggers:

        1) severity= WARNING
        ({host1.YOURKEY.last(0)} + {host2.YOURKEY.last(0)} + {host3.YOURKEY.last(0)} + {host4.YOURKEY.last(0)}) > 0

        2) severity= HIGH
        ({host1.YOURKEY.last(0)} + {host2.YOURKEY.last(0)} + {host3.YOURKEY.last(0)} + {host4.YOURKEY.last(0)}) > 1

        3) severity= DISASTER
        ({host1.YOURKEY.last(0)} + {host2.YOURKEY.last(0)} + {host3.YOURKEY.last(0)} + {host4.YOURKEY.last(0)}) > 2

        I think that should work as well.

        Not too sure on what host this triggers are to be bound. Maybe define a pseudo host (127.0.0.1), call it "loadbalancer" and have the triggers attached there.
        Hosts can evaluate "foreign" items in triggers, while templates cannot.

        Comment

        • steveboyson
          Senior Member
          • Jul 2013
          • 582

          #5
          Eventually, the syntax "host1.YOURITEM.last(0)" does not work.

          You might have to use it as follows:

          last("host1.YOURITEM") + last("host1.YOURITEM") + last("host2.YOURITEM") + last("host3.YOURITEM") > TRHESHOLD

          That works definitely as I use it to check the status of running vmware tools both on unix and windows system within a single template for both OS kinds.
          I have two items, of which one is written in windows-ish (proc_num[vmtoolsd.exe,system]) and one unix-ish (proc_num[vmtoolsd,root]).

          Then I have a defined a calculated item which reads:
          last("proc_num[vmtoolsd.exe,system]") + last("proc_num[vmtoolsd,root]")
          and a trigger which fires if the value of this calculated item is < 1.
          It is *worky* ;-)
          Last edited by steveboyson; 04-03-2014, 13:04.

          Comment

          • chechu
            Junior Member
            • Mar 2014
            • 6

            #6
            Hello steveboyson,

            Thanks again for your fast reply.

            This is exactly how we have it configured, we have a Host (127.0.0.1) as a container where we created all the items/triggers on it.

            I'll try to configure what you suggest, sound good. I'll add dependencies between them in order to avoid duplicity and escalability.

            I'll come back to you if it worked

            Thanks again!

            Chechu.

            Comment

            • chechu
              Junior Member
              • Mar 2014
              • 6

              #7
              Hello steveboyson,

              I've configured the following trigger, zabbix syntax looks ok:

              Severity: Warning

              ({HOST:STATUS_HOST.last(0)}+{HOST:STATUS_HOST.last (0)}+{HOST:STATUS_HOST.last(0)}+{HOST:STATUS_HOST. last(0)})>0

              Thanks again for the help provided.

              I'll confirm during this week if this is working as it should.

              Regards,

              Chechu.

              Comment

              Working...