[SNMP4J] integrating SNMP4J with code from AgentPro

Brian Kirwan bkirwan at adaptive-mobile.com
Fri May 13 17:03:56 CEST 2005


Hi Frank,

Thanks very much for your response.

OK - I have successfully generated basic code for my custom MIB using
AgentPro (very straightforward to do) and registered it with my test agent
and can access objects in this new custom MIB from my manager.  Great!

Obviously, my next step is to integrate my custom MIB variables with the
actual backend resources they represent and to be able to generate traps
from my agent also.  Is there any example of this anywhere I can refer to?
I see there is, for example, a setValue() method on the MOScalar class - am
I expected to create a new thread of my own that will invoke this method
locally (based on changes detected in the backend)  to update the value of
the SNMP variable?  If so, are there issues with synchronizing access to the
MOs?  Or is there some other mechanism to synchronize the MIB with the
backend?

Thanks for your help,
Brian.


----- Original Message -----
Sent: Tuesday, May 10, 2005 7:55 PM
Subject: Re: [SNMP4J] integrating SNMP4J with code from AgentPro


> Hi Brian,
>
> Yes, it works as you guessed. AgenPro will generate a single .java
> file for each MIB module. The file will be named from the MIB module
> name and it defines MOGroup class with a couple of inner classes for
> the scalars and tables defined in the MIB module.
>
> To integrate your MIB module into a SNMP4J-Agent agent you only
> need to create an instance of the generated MOGroup and then call
> registerMOs(server, null) on that instance. That's all.
>
> I have not described this in detail yet, because I am thinking of further
> automating this for the final version as it is automated for AGENT++
> already.
>
> Hope this helps. If you need more information, please do not hesitate
> to contact me.
>
> Best regards,
> Frank
>
> Brian Kirwan wrote:
>
> >Hi,
> >
> >I need to build an agent supporting a proprietary MIB.  I have run the
test agent and can interact with it fine from my SNMP manager and that's
great.
> >
> >Now I have scanned through the AgentPro documentation and have a
reasonable idea what it does.  But I can't see any description of where the
code generated by AgentPro is integrated with the SNMP4J agent (I have gone
through the mail archives etc.).  Should I expect that AgentPro generates
classes for my proprietary MIB that implement the MOGroup interface so I can
call the registerMOs() method like is done with snmpv2MIB, vacmMIB etc in an
overridden version of the init() method of BaseAgent?  Is there somewhere
this procedure is described?
> >
> >Thanks,
> >Brian.
> >_______________________________________________
> >SNMP4J mailing list
> >SNMP4J at agentpp.org
> >http://lists.agentpp.org/mailman/listinfo/snmp4j
> >
> >
> >
>




More information about the SNMP4J mailing list