Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-5528

SNMPtrap.regexp() is unreliable

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Major Major
    • None
    • 2.0.2
    • Server (S)
    • FreeBSD-8.2

      I'm trying to handle Cisco PGW2200 traps about links UpDown and such things.

      I've created basically:
      Item of type SNMP Trap, Key is `snmptrap[CISCO-TRANSPATH-MIB::tpCompMMLName.1900545]` in order to handle all traps related
      to one PGW object (link in this case)
      Trigger looks like (I know that it isn't working, the purpose is to show the issue):
      `(

      {TRIGGER.VALUE}=0&{pgw:snmptrap[CISCO-TRANSPATH-MIB::tpCompMMLName.1900545].regexp(CISCO-TRANSPATH-MIB::tpAlarmSet.0)}=1)|({TRIGGER.VALUE}

      =1&

      {pgw:snmptrap[CISCO-TRANSPATH-MIB::tpCompMMLName.1900545].regexp(CISCO-TRANSPATH-MIB::tpAlarmSet.0)}

      =0)`

      The issue is trigger switching on receiving link Up trap, so it goes from OK to Problem on first trap and from Problem to OK on second.
      AFAIU it's possible only if regexp is False (=0) on first trap and True (=1) on second, which is impossible.

      Related MIB can be found at http://www.cisco.com/iam/PGW_MIBS/973/tp.my , it's actually not completely correct, but can be used to convert numeric OID to text for the readability sake.

      trap.sh is script to send traps using net-snmp (commuity is 'public', zabbix IP is 10.1.2.30, can be changed in the source). Usage: `./trap.sh up` for linkUp trap, `./trap.sh down` for linkDown trap.

      pgw_linkupdown.txt contains linkDown and linkUp traps from zabbix log, sent by PGW.

      Up and Down traps are different in one line/value:
      tpAlarmSet OBJECT-TYPE
      SYNTAX INTEGER

      { clear (1), set (2) }

      MAX-ACCESS not-accessible
      STATUS current
      DESCRIPTION
      "The alarm set or not."
      ::=

      {tpAlarmObject 5}

        1. pgw_linkupdown.txt
          4 kB
        2. trap.sh
          1 kB
        3. zbx_events.txt
          0.3 kB
        4. zbx_items.txt
          5 kB

            Unassigned Unassigned
            ojab ojab
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: