Thanks for the reply.

On Sat, Jan 3, 2009 at 12:09 PM, Nikos Balkanas <nbalka...@gmail.com> wrote:
>
> I am doing the exact same thing, still not finished, but further along the 
> way.
> The documentation is very clear on that. Please check the tutorials:
>
> 1) Subagent    http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent
> 2) Shared object
> http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Dynamically_Loadable_Object
> 3) Chaging the master agent
> http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_MIB_Module

If I understand it right, these tutorials describe how I can plug my
own MIB module, with knowledge of how to access my server
application's variables, into the agent. Since I don't want to (and I
guess I'm not supposed to either) incorporate my entire server into
this module, the MIB module will have to communicate with my server
application somehow.

> All of these provide a custom handler placeholder that you can place your
> own code to interface with your application. Of course you will need to add
> support from your application to serve these requests and fire traps.

Yes, but this is still unclear to me. Am I supposed to start the agent
and my server application as two separate processes, and make them
communicate with each other (through the MIB module)? Or can I just
plug the Net-SNMP agent into my server application, and have my MIB
module retrieve the needed information through simple function calls?

-- Bart


> Start by writing your own MIB (definition) file describing your variables.
> Then try mib2c to see if it can generate the code for you from the MIB. I
> couldn't get it to work for me (Solaris 10.5), so I had to tough it out from
> scratch using the examples http://www.net-snmp.org/dev/agent/examples.html
>
> BR,
> Nikos
>
> ----- Original Message ----- From: "Bart Cornelissen"
> <bart.cornelis...@uhasselt.be>
> To: <net-snmp-users@lists.sourceforge.net>
> Sent: Saturday, January 03, 2009 12:43 PM
> Subject: Integrating net-SNMP agent into my application
>
>
>> Hi,
>>
>> We have written a server application that we would like to extend with
>> some monitoring support. The goal is to expose some variables that
>> describe the status of these servers, so their status can be easily
>> visualized with a remote application.
>> Is there a way to integrate the Net-SNMP agent module into our
>> application? The documentation only seems to mention how to extend the
>> agent application, but not the other way around.  Reorganizing our
>> project so that the servers start up from within the Net-SNMP agents
>> seems a way too drastic change, since the monitoring should be an
>> optional feature anyway.
>>
>> Or am I looking at it the wrong way?  I don't have any experience with
>> Net-SNMP, or SNMP even.
>>
>> Thanks,
>> Bart

------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to