Template:FAQ:Agent 04
From Net-SNMP Wiki
Revision as of 08:32, 8 June 2009 by Dts12 (Talk | contribs) (Latest FAQ revision - preparing for 5.5 release)
Adding a MIB essentially involves writing some code to implement the objects defined in the new MIB. There are three basic approaches that can be used to do this:
- The agent can invoke an external command or shell script to return the necessary information. There are several possible variations on this approach - see the next entry for details.
- The agent can pass the request off to another (sub-)agent, which already implements the required MIB. Again, there are several ways of doing this - including AgentX, SMUX and proxied SNMP. See the next entry but one for details.
- You can write code to implement the new MIB objects, and include this within the agent. This is most commonly C (or C++) code, although the agent can also support MIB modules implemented in perl or (from 5.4) python.
See the next section (CODING) for more details.
Note that there is no visible difference between external commands, subagents, and modules implemented within the main agent itself. Tools querying the agent will see a single MIB structure.