Skip to content Skip to sidebar Skip to footer

Issue With Pysnmp Trap Receiver.for Snmpv3

PSNMP Socket is actually receiving traps but the call back function is not getting called. I have enabled the debug logging. Using Pysnmp 4.3.3 from pysnmp.entity import engine, co

Solution 1:

SNMPv3 TRAPs mandate you configuring SNMP Engine ID of the TRAP sending application to USM users table of TRAP receiving application for each USM user:

config.addV3User(
    snmpEngine, 'user_snmp1234',
    securityEngineId=v2c.OctetString(hexValue='8000000001020304')
)

So you should either configure (or figure out in device configuration) authoritative SNMP engine ID of your TRAP sending apps or devices, then configure them into your TRAP receiver.

If you are struggling figuring out SNMP engine ID of your devices, try this tool -- it will talk to your device and report its SNMP engine ID.

This is how you could send TRAP with Net-SNMP snmptrap tool setting its SNMP engine ID to specific value:

$ snmptrap -v3 -u user_snmp1234 -l noAuthNoPriv -e 8000000001020304127.0.0.11231.3.6.1.6.3.1.1.5.1

As explained by the first link, all that complications are due to the fact that (otherwise automatic) SNMP engine ID discovery does not over unidirectional messaging such as TRAPs.

Post a Comment for "Issue With Pysnmp Trap Receiver.for Snmpv3"