Hi,
A warm welcome to the AGENTPP forum - you are indeed the first poster, congratulations!
Regarding your questions: Are you sending TRAPS (notifications) or INFORM requests?
- For TRAPS:
To successfully receive TRAPS with SNMPv3 User based Security Model (USM) and authNoPriv or authPriv security level enabled, you need to add the USM user with the engine ID of the notification generator (the agent) to you local USM.
This is different to adding users for sending requests to that agent, because in that cause you can leave the engine ID unset and SNMP4J will do the authoritative engine ID lookup for you by default, when the first request is being sent to the agent.
For notifications the engine ID lookup works on-the-fly. - For INFORMS:
When sending INFORMs from the agent to the SNMP4J manager (notification receiver), then the SNMP4J notification receiver is authoritative. Thus, the agent (command responder) needs to use the engine ID of the manager (notification receiver) to send the SNMPv3 INFORM request.
In this case, is it absolutely necessary that you add the USM user the agent is using as localised user with the engineID of the agent to the SNMP4J manager!
Otherwise the manager will not be able to handle the INFORM request.
In any case, you have the following options to get more information about that on the SNMP4J manager side:
- Call SNMP4JSettings.setForwardRuntimeExceptions(true) to get exceptions forwarded to your code.
- On the TransportMapping you can add a listener with addTransportListener method. In that listener you will be able to log any communication that happens on that transport.
- There are other more advanced (low level) hooks that can be used. I could provide examples, if I got more details, what we are looking for, i.e. TRAP vs INFORM.
Best regards,
Frank