Re: Writing a MIB Module

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAKoMtGaT7t_E9d1+xoKamiqV4NTeDiFMn0B0tWmgrdyPwe4MZQ@mail.gmail.com>
On 9 November 2011 20:43, Simon Chamlian <[email protected]> wrote:
> After reading the tutorials for “Writing a MIB Module”, it seems that there
> are 3 methods of adding our own MIB into the agent:
>
> 1)      Directly compiled in code
>
> 2)      Writing a subagent (AgentX), which is another daemon
>          that talks to snmpd via IPCs

It talks to the master agent via a simple stream connection,
using a standard protocol (very similar to SNMPv2).
This isn't strictly an IPCs.

> 3)      Dynamically loaded shared objects


Yes - these are the three approaches for adding a new C-based
MIB module to the agent.


> Now each has its pros and cons but I would like to know, which method is:
>
> 1)     The most recommended
> 2)     Easiest to implement
> 3)     Easiest to debug.

The first thing to realise is that the code for the MIB module will be
exactly the same in all three cases.   So you can develop and test
the MIB implementation using one approach, and put that same code
into service using a different choice.

Personally, I'd be inclined to develop the code using directly compiled
in code (working with a test agent - typically running on a non-standard
port).   That takes the AgentX and dlmod levels out of the equation,
which means one less thing to go wrong, or get in the way.

Once you're happy with the code, then you can take a separate
decision as to how best to deploy the new MIB.   Which may well use
AgentX or dynamic loading.

But personally I'd always start with the simplest setup - directly compiled
into a single agent.

Dave

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.