On 13 February 2012 00:58, Zain Mirza <[email protected]> wrote:
>   a) i have to write add extra layer in my java processes that interacts
> with snmpd agent. If so how ? code examples?

> c) I have to write sub agents? Do I also have to use AgentPro necessarily to
> generate java stubs for my mib files ? if so how do I plug them in to snmpd?

Mohammad has been giving you some advice about this style of working,
And an embedded subagent is certainly the most effective/efficient approach
(particularly if you also need to handle SET requests - i.e. active management
as well as passive monitoring).


But I'd just like to say that your alternative idea:

>  b) can I write some generic code which can be invoked by my snmpd to read
>     some data repository (a file or db etc.). If so how and how can I 
> integrate
>     it with snmpd? Code examples?

is also perfectly workable - particularly for simple monitoring purposes, where
exact up-to-the-second data is not 100% vital.

The idea here would be for your java processes to regularly dump a
representation
of their internal statistics into a text file somewhere.   Separately,
you'd write a
MIB module implementation to read this text file, and use it as the data for
processing MIB requests.

The template code generated by mib2c.table_data.conf and mib2c.iterate.conf
for loading cached data is written using such an approach (since it needs to do
*something*!) so should be easily adaptable to the details of your
particular MIB.
   There's probably nothing quite as close for scalar objects,  but
the same cache
approach should work here too.

Have a look at the various code files under 'agent/mibgroup' to get some idea
about how other MIB modules have been implemented.

Dave

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to