Difference between revisions of "Template:FAQ:Agent 04"
From Net-SNMP Wiki
(Fix references to agent extension FAQ entries.) |
m (Latest FAQ revision - preparing for 5.5 release) |
||
Line 5: | Line 5: | ||
Agent section. | Agent section. | ||
--> | --> | ||
− | + | Adding a MIB essentially involves writing some code to | |
implement the objects defined in the new MIB. There are three basic | implement the objects defined in the new MIB. There are three basic | ||
approaches that can be used to do this: | approaches that can be used to do this: |
Revision as of 08:32, 8 June 2009
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.