Ad Widget

Collapse

Any way to get just value in snmp trap?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lmnti33s
    Junior Member
    • Sep 2014
    • 8

    #1

    Any way to get just value in snmp trap?

    Hi. I'm trying to get just the value of a specific item in an SNMP trap. The device in question only sends traps, not capable of querying for SNMP.

    So right now, I am getting
    notificationtype TRAP
    version 0
    receivedfrom UDP: [XXXXXX]:45028->[XXXXXX]
    errorstatus 0
    messageid 0
    community public
    transactionid 7
    errorindex 0
    requestid 0
    VARBINDS:
    DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (989783) 2:44:57.83
    SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: SNMPv2-SMI::enterprises.674.10892.5.3.2.5.0.10395
    SNMPv2-SMI::enterprises.674.10892.5.3.1.1.0 type=4 value=STRING: "TST001"
    SNMPv2-SMI::enterprises.674.10892.5.3.1.2.0 type=4 value=STRING: "The iDRAC generated a test trap event in response to a user request."
    SNMPv2-SMI::enterprises.674.10892.5.3.1.3.0 type=2 value=INTEGER: 3
    SNMPv2-SMI::enterprises.674.10892.5.3.1.4.0 type=4 value=STRING: "SN1235"
    SNMPv2-SMI::enterprises.674.10892.5.3.1.5.0 type=4 value=STRING: "XXXXX"
    SNMPv2-SMI::enterprises.674.10892.5.3.1.6.0 type=4 value=""
    SNMPv2-SMI::enterprises.674.10892.5.3.1.7.0 type=4 value=""
    SNMPv2-SMI::enterprises.674.10892.5.3.1.8.0 type=4 value=""
    SNMPv2-SMI::enterprises.674.10892.5.3.1.9.0 type=4 value=""
    SNMPv2-SMI::enterprises.674.10892.5.3.1.10.0 type=4 value=""
    SNMPv2-SMI::enterprises.674.10892.5.3.1.11.0 type=4 value=STRING: "XXXX"
    SNMP-COMMUNITY-MIB::snmpTrapAddress.0 type=64 value=IpAddress: XXXX
    SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 type=4 value=STRING: "public"

    Is there any way to just get the value of SNMPv2-SMI::enterprises.674.10892.5.3.1.4.0 type=4 value=STRING: so that my item value in zabbix would be SN1235?

    Thanks
  • pantera
    Member
    • Dec 2014
    • 39

    #2
    just for example I found on the net:

    snmptrap["SNMPv2-SMI::enterprises.674.10892.5.3.1.4.0 type=4 value=STRING: \"{#SNMPVALUE}\""]

    Comment

    Working...