Ad Widget

Collapse

SNMP v3 trap issue: unmatched trap received

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pakr
    Junior Member
    • Dec 2015
    • 2

    #1

    SNMP v3 trap issue: unmatched trap received

    Hello.

    I have a problem with setting up SNMP v3 traps. Whenever I send a test trap, Zabbix is assigning it to correct host, but it is detected as 'unmatched trap'. I believe there is something wrong with SNMPv3 credentials, because if I set the trap to be sent as v2c snmp trap and add proper authCommunity in /etc/snmp/snmptrapd.conf, the trap is detected correctly according to the key in created item.

    I use the same credentials for standard SNMPv3 queries and everything works fine.

    Below is some basic configuration info:
    - I'm using zabbix_trap_receiver.pl as a trap handler
    - I have configured user, authentication and privacy information in /etc/snmp/snmpd.conf and snmptrapd.conf

    Here's my snmpd.conf:
    [...]
    createUser -e 0x800000D380500000E0DA2B7400 snmpv3-user MD5 authpass DES privpass
    rouser snmpv3-user

    snmptrapd.conf:
    [..]
    createUser -e 800000D380500000E0DA2B7400 snmpv3-user MD5 authpass DES privpass
    #authCommunity log,execute,net ro-community
    authUser log,execute,net snmpv3-user
    perl do "/usr/local/bin/zabbix_trap_receiver.pl";

    It looks that entries in /var/lib/net-snmp/snmpd.conf and snmptrapd.conf are created accordingly to the above ones.

    I tried pasting the "Engine ID" with and without preceding it with "0x".

    Also, if I check the entries in /tmp/zabbix_traps, the Engine ID is always a mess:
    10:19:53 2015/12/01 ZBXTRAP 10.255.250.24
    PDU INFO:
    contextEngineID <80>^@^@Ó<80>P^@^@àÚ+t^@
    notificationtype TRAP
    version 3
    receivedfrom UDP: [10.255.250.24]:57586->[10.255.215.11]
    errorstatus 0
    messageid 0
    securitylevel 3
    securityEngineID <80>^@^@Ó<80>P^@^@àÚ+t^@
    securityName snmpv3-user
    contextName
    securitymodel 3
    transactionid 1
    errorindex 0
    requestid 271

    I would be very grateful for any tip - I'm struggling with this problem for a third day, and at this point I have no idea what might be wrong.

    Best regards,
    Pawel
  • pakr
    Junior Member
    • Dec 2015
    • 2

    #2
    I can also add that the SNMPv3 traps seem to be decrypted properly, because the "VARBINDS" section is visible in clear text (int /tmp/zabbix_traps):

    22:29:35 2015/12/02 ZBXTRAP 10.255.252.11
    PDU INFO:
    contextEngineID <80>^@aÝ^A^?^@^@^A
    notificationtype TRAP
    version 3
    receivedfrom UDP: [10.255.252.11]:48683->[10.255.215.11]
    errorstatus 0
    messageid 844132084
    securitylevel 3
    securityEngineID <80>^@aÝ^A^?^@^@^A
    securityName snmpv3-user
    contextName
    securitymodel 3
    transactionid 5
    errorindex 0
    requestid 909852297
    VARBINDS:
    DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (73148500) 8 days, 11:11:25.00
    SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: SNMPv2-SMI::enterprises.25053.2.11.1.100
    SNMPv2-SMI::enterprises.25053.2.11.2.13.0 type=4 value=STRING: "Informational"
    SNMPv2-SMI::enterprises.25053.2.11.2.10.0 type=4 value=STRING: "202"
    SNMPv2-SMI::enterprises.25053.2.11.2.14.0 type=4 value=STRING: "clientJoin"

    and here's the same trap sent as V2 trap:

    21:29:03 2015/12/02 ZBXTRAP 10.255.252.11
    PDU INFO:
    notificationtype TRAP
    version 1
    receivedfrom UDP: [10.255.252.11]:48683->[10.255.215.11]
    errorstatus 0
    messageid 0
    community public
    transactionid 29
    errorindex 0
    requestid 909852291
    VARBINDS:
    DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (72785200) 8 days, 10:10:52.00
    SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: SNMPv2-SMI::enterprises.25053.2.11.1.100
    SNMPv2-SMI::enterprises.25053.2.11.2.13.0 type=4 value=STRING: "Informational"
    SNMPv2-SMI::enterprises.25053.2.11.2.10.0 type=4 value=STRING: "202"
    SNMPv2-SMI::enterprises.25053.2.11.2.14.0 type=4 value=STRING: "clientJoin"

    With V2 traps, they appear in Zabbix as below:
    22:50:22 2015/12/02 PDU INFO:
    notificationtype TRAP
    version 1
    receivedfrom UDP: [10.255.252.11]:48683->[10.255.215.11]
    errorstatus 0
    messageid 0
    community public
    transactionid 1
    errorindex 0
    requestid 909852298
    VARBINDS:
    DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (73273200) 8 days, 11:32:12.00
    SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: SNMPv2-SMI::enterprises.25053.2.11.1.100
    SNMPv2-SMI::enterprises.25053.2.11.2.13.0 type=4 value=STRING: "Informational"
    SNMPv2-SMI::enterprises.25053.2.11.2.10.0 type=4 value=STRING: "202"
    SNMPv2-SMI::enterprises.25053.2.11.2.14.0 type=4 value=STRING: "clientJoin"

    While with V3 traps everything after "PDU INFO:" is truncated:
    22:50:22 2015/12/02 PDU INFO:

    Is it possible that there's something wrong with perl script itself ?

    Comment

    • zalex_ua
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Oct 2009
      • 1286

      #3
      Reported in https://support.zabbix.com/browse/ZBX-10830

      Comment

      Working...