[AGENT++] Odd AgentX problem

Frank Fock fock at agentpp.com
Thu Oct 5 08:15:15 CEST 2006


Hello,

Have you checked that your sub-agent is not registering
another node under the 1.3.6.1.4.1.4969.1 OID with the
same priority?

Have you tried the same configuration with the AgentX++
or SNMP4J-Agent master agent? The NET-SNMP master
agent does not handle registration boundaries correctly
in all cases.

Best regards,
Frank Fock

johnny at navtek.no wrote:
> Hello all
> 
> I've just started to get my head around agent++/agentX and have started to
> create my own subagent using the example provided as the basis. I'm
> running net-snmp as the master.
> 
> My problem:
> When I do this:
>     Oidx myOID("1.3.6.1.4.1.4969.1");
>     add(new MibLeaf(myOID, READWRITE, new SnmpInt32(23)));
> # snmpwalk -v 1 -c public localhost 1.3.6.1.4.1.4969
> doesn't show anything
> However when I do this:
>     Oidx myOID("1.3.6.1.4.1.4969.2");
>     add(new MibLeaf(myOID, READWRITE, new SnmpInt32(23)));
> # snmpwalk -v 1 -c public localhost 1.3.6.1.4.1.4969
> will show:
> SNMPv2-SMI::enterprises.4969.2 = INTEGER: 23
> 
> How come?
> 
> My two own files look like this:
> -myagent.h-file
> #include <agent_pp/mib.h>
> #include <agent_pp/snmp_textual_conventions.h>
> #include <agent_pp/notification_originator.h>
> #include <agentx_pp/agentx_subagent.h>
> #define oidPas                                  "1.3.6.1.4.1.4969"
> namespace Agentpp {
> class pasSnmpAgent: public MibGroup {
>  public:
> 	pasSnmpAgent(const OctetStr&, SubAgentXMib*);
> 	virtual ~pasSnmpAgent() { }
> 	static pasSnmpAgent* instance;
> };
> }
> -myagent.cpp-file:
> #include <agent_pp/mib.h>
> #include <agent_pp/snmp_textual_conventions.h>
> #include <agent_pp/notification_originator.h>
> #include <agentx_pp/agentx_subagent.h>
> #include <pasSnmpMIB.h>
> namespace Agentpp {
>   pasSnmpAgent::pasSnmpAgent(const OctetStr& context, SubAgentXMib* mib):
>     MibGroup(oidPas, "pasMIB")
>   {
>     Oidx myOID("1.3.6.1.4.1.4969.1");
>     add(new MibLeaf(myOID, READWRITE, new SnmpInt32(23)));
>   }
> }
> 
> 
> regards

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the AGENTPP mailing list