Ad Widget

Collapse

Trigger on "Zabbix trapper" item behaving weirdly - what am I doing wrong? (1.8.5)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neal.c
    Junior Member
    • Aug 2012
    • 2

    #1

    Trigger on "Zabbix trapper" item behaving weirdly - what am I doing wrong? (1.8.5)

    I'm trying to set up SNMP Trap monitoring in Zabbix 1.8.5 based on the following script: http://www.zabbix.com/wiki/howto/mon...a_new_solution

    Essentially what it does, is it posts the contents of an SNMP Trap into a Zabbix item of type "Zabbix trapper" with type of information = "text." That part is working, here's some sample data:

    Code:
    [2012.Aug.27 18:18:43]	IF-MIB::linkUp, ifIndex.10025: 10025, ifAdminStatus.10025: up, ifOperStatus.10025: up, ifDescr.10025: FastEthernet1/0/25, ifType.10025: ethernetCsmacd, enterprises.9.2.2.1.1.20.10025: "up"
    [2012.Aug.27 18:18:16]	IF-MIB::linkDown, ifIndex.10025: 10025, ifAdminStatus.10025: down, ifOperStatus.10025: down, ifDescr.10025: FastEthernet1/0/25, ifType.10025: ethernetCsmacd, enterprises.9.2.2.1.1.20.10025: "administratively down"
    I've set up the following trigger, with the idea that it should only trigger when this particular interface (ifIndex.10025) gets a linkDown event, and it should recover when that interface gets a linkUp event:

    Code:
    ({TRIGGER.VALUE}=0 & {swtch02:.1.3.6.1.6.3.1.1.5.str("10025")}=1 & {swtch02:.1.3.6.1.6.3.1.1.5.str("linkDown")}=1)
    |
    ({TRIGGER.VALUE}=1 & {swtch02:.1.3.6.1.6.3.1.1.5.str("10025")}=1 & {swtch02:.1.3.6.1.6.3.1.1.5.str("linkUp")}=1)
    Now, here's what I find weird. When a linkDown event posts, the trigger will go into PROBLEM status. Next a linkUp text posts to the item, and it stays in PROBLEM. Next a linkDown text posts, and it goes to OK status. Then a linkUp text posts, and it stays in OK.

    It's behaving as if {TRIGGER.VALUE} is always 0 - linkUp events never change the trigger state, linkDown events always do.

    I've tried changing the "{TRIGGER.VALUE}=1" to "{TRIGGER.VALUE}#0", that doesn't seem to make a difference. Likewise with changing "str" to "regexp". I've also tried changing the first one to "{TRIGGER.VALUE}#1" in case starting from "UNKNOWN" status was tripping it up, no difference there either.

    It even sends out the OK alert email with the "Last value" clearly showing text with "linkDown" and not "linkUp".

    I'm seriously lost here. I don't know what's wrong that would cause this behavior. Have I run into some sort of limit with the way Zabbix works on "Zabbix trapper" or "text" items, or am I missing something obvious here?
    Last edited by neal.c; 27-08-2012, 21:34.
  • raoul
    Junior Member
    • Nov 2011
    • 29

    #2
    Re:

    It should be :

    ({TRIGGER.VALUE}=0 & {swtch02:.1.3.6.1.6.3.1.1.5.str("10025")}=1 & {swtch02:.1.3.6.1.6.3.1.1.5.str("linkDown")}=1)
    |
    ({TRIGGER.VALUE}=1 & {swtch02:.1.3.6.1.6.3.1.1.5.str("10025")}=1 & {swtch02:.1.3.6.1.6.3.1.1.5.str("linkUp")}=0)

    Last value should be 0 instead of 1, as you're defining here the conditions for the trigger to send an alarm. Alarm should be active if :
    - trigger is down and "linkDown" trap is received,
    - trigger is up and NO "linkUp" trap is received.

    Cheers,

    y/

    Comment

    • neal.c
      Junior Member
      • Aug 2012
      • 2

      #3
      Originally posted by raoul
      Last value should be 0 instead of 1, as you're defining here the conditions for the trigger to send an alarm. Alarm should be active if :
      - trigger is down and "linkDown" trap is received,
      - trigger is up and NO "linkUp" trap is received.
      Oh man. That's so obvious when you put it that way. And of course, the trigger works great now.

      I knew it had to be something obvious. Thank you for pointing it out to me!

      Comment

      • raoul
        Junior Member
        • Nov 2011
        • 29

        #4
        you're welcome.
        thanks for the feedback.
        cheers,

        r/

        Comment

        Working...