Ad Widget

Collapse

Action based on multiple triggers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mbconn
    Junior Member
    • May 2011
    • 14

    #1

    Action based on multiple triggers

    I have an action which generates an email when 2 conditions are triggered, i.e.

    trigger value=PROBLEM AND
    Host template=Template_My_Generic AND
    Trigger = "Template_My_Generic:Server unreachable via {$PRIMARY}" AND
    Trigger = "Template_My_Generic:Server unreachable via {$SECONDARY}"

    PRIMARY and SECONDARY are global macros defined as our primary and secondary internet links. That is, I want the action to fire when a server is unreachable via both links.

    The triggers get set properly and I can see the events being raised. I can get the action to work fine with either the PRIMARY or SECONDARY triggers, but not when I specify both.

    Any ideas?
    Last edited by mbconn; 13-12-2011, 17:30.
  • mbconn
    Junior Member
    • May 2011
    • 14

    #2
    Resolved: Action based on multiple triggers

    the trick appears to be to create a single trigger with an expression referring to multiple items, like:

    "Template_My_Generic:Server unreachable via {$PRIMARY} and {$SECONDARY}" = {Template_My_Genericing_backup.sh.last(0)}=0 & {Template_My_Genericing.sh.last(0)}=0

    and then use this trigger as the basis for the action, like:

    Trigger value = PROBLEM AND
    Host template = Template_My_Generic AND
    Trigger = "Template_My_Generic:Server unreachable via {$PRIMARY} and {$SECONDARY}"

    Comment

    • Davidus
      Senior Member
      • Dec 2010
      • 281

      #3
      How about trigger dependencies?
      Wouldn’t it be better solution?

      Comment

      • mbconn
        Junior Member
        • May 2011
        • 14

        #4
        hi Davidus

        thanks for the response. Can you explain a bit how that works - I understand adding the dependencies in the trigger but it's not clear to me what the trigger expression should be?

        thanks again
        M

        Comment

        • Davidus
          Senior Member
          • Dec 2010
          • 281

          #5
          Originally posted by mbconn
          Can you explain a bit how that works - I understand adding the dependencies in the trigger but it's not clear to me what the trigger expression should be?
          Being honest I don’t know much about trigger dependencies
          little bit information can be found on following link
          http://www.zabbix.com/documentation/...r_dependencies

          If I`m not mistaken you have to set up two triggers
          First trigger - "Template_My_Generic:Server unreachable via {$PRIMARY}"
          Second trigger - "Template_My_Generic:Server unreachable via {$SECONDARY}"
          or whatever your triggers are

          After you done add first trigger to second as an dependency
          Once again I`m not sure... I`m just taking a guess on how it can be possibly done
          Attached Files

          Comment

          • mbconn
            Junior Member
            • May 2011
            • 14

            #6
            thanks again D

            that would seem to make sense but my tests haven't been successful. I added the second trigger to the first as a dependency then used the first as the basis of the action. However, when only the first trigger is true the action is kicked off, i.e. {$PRIMARY} is down but {$SECONDARY} is still up. The only way I've got it to work properly is as described above.

            Comment

            • Davidus
              Senior Member
              • Dec 2010
              • 281

              #7
              Wired, that had to work

              Try to do following
              A trigger depends on trigger B
              Trigger B depends on trigger A

              and let me know what happens

              Comment

              Working...