Ad Widget

Collapse

SNMP Trap regex mutltiple matches

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lucasdx
    Junior Member
    • Jul 2019
    • 1

    #1

    SNMP Trap regex mutltiple matches

    Goodafternoon, guys

    I recently configuration zabbix to accept SNMP traps using the following HOWTO located at https://www.zabbix.org/wiki/Start_wi...raps_in_Zabbix . I configured everything including the LLD for interface linkUp /linkDown traps. However I am running into a problem with the triggers expressions.

    But the trigger don't match and I can't get the #SNMPVALUE

    What I want is get the #snmpvalue and put the info in the trigger name to show the interface when the status changed.

    The trigger expression is exactly as specified in the HOWTO
    : {SNMP TRAP:snmptrapsnmptrap["(IF-MIB::linkDown|IF-MIB::linkUp)(.|[[:space:]])*{#SNMPVALUE}"]==1

    When I delete the "(.|[[:space:]])*{#SNMPVALUE}" I can get the result and the trigger works

    ZBXTRAP xxxxxxx
    PDU INFO:
    notificationtype TRAP
    version 1
    receivedfrom UDP: [xxxxxxxxx]:64162->[xxxxxxx]:162
    errorstatus 0
    messageid 0
    community trapmonitor
    transactionid 114
    errorindex 0
    requestid 0
    VARBINDS:
    DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (543314742) 62 days, 21:12:27.42
    SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: IF-MIB::linkDown
    IF-MIB::ifIndex.47 type=2 value=INTEGER: 47
    IF-MIB::ifAdminStatus.47 type=2 value=INTEGER: 2
    IF-MIB::ifOperStatus.47 type=2 value=INTEGER: 2
    IF-MIB::ifDescr.47 type=4 value=STRING: "XGigabitEthernet0/0/42"


    How can I show that value=STRING: XGigabitEthernet0/0/42" in trigger name?

    Thank you.
  • radashv
    Junior Member
    • Nov 2019
    • 2

    #2
    Hello

    You can change the #SNMPVALUE to #IFNAME or #IFDESCR. Hope it help!

    Comment

    Working...