I am trying to send SNMP - V3 traps using "Agentpp::MasterAgentXMib::instance->notify ( “”, trapOid, &varBind, 0 ) " But it is not sent.I’m using snmp++,agent++ and agentx++ together.
( agent++ version 4.1.2 agentX++ version 2.1.2 snmp++ version 3.3.11 )
Here is the log!
700101.00:44:02: -1403587504: (1)EVENT : AgentX Master Agent starting
19700101.00:44:02: -1403587504: (1)INFO : AgentX: listening for AgentX requests on UNIX (port): (/var/agentx/master)
19700101.00:44:02: -1403587504: (1)EVENT : AgentXMaster: listening on TCP (socket)(port): (133), (705)
19700101.00:44:53: -1267043248: (5)EVENT : NotificationLog: Logging (target)(oid)(vbs): (), (1.3.6.1.4.1.50565.1.2.0.3), (0)
19700101.00:44:53: -1267043248: (2)EVENT : Notification not sent (reason) (addr) (params): (no access), ( AC 11 02 15 00 A2 …
), (TestTrap)
As the log output explains, the notification is not send because of “no access”. That means, that there is no matching access entry in the VACM (SNMP-VIEW-BASED-ACM-MIB) for the notification OID and all the variable binding OIDs (in your cause there aren’t any).
Thus, you need to modify or add an access entry in the above MIB for OID 1.3.6.1.4.1.50565.1.2.0.3 (or one of its prefixes) to allow the notification to be sent out.
Your access entry is for the context ‘defaultGroup’ with exact match, but the notification is not send on behalf that context. Therefore no access is granted.
I do not know why you want to have two MIB instances in one process (agent). Maybe you might With AGENT++ 4.3.0 you can easily have two agents (and thus two separate Mib instances) in the same process. But I doubt that this is really what you need.