FAQ:Agent 10
From Net-SNMP Wiki
Which should I use?
That's not easy to answer in general.
If there's an existing agent that already implements the desired new MIB, then it makes sense to re-use that, via whatever extension protocol it might support. Ideally, this would be an AgentX sub-agent, since the AgentX protocol is deliberately designed for this purpose, and provides a fuller and more reliable mechanism than either SMUX or proxied SNMP. But if the target subagent only supports SMUX or basic SNMP, then that would dictate the extension protocol to use.
Implementing the module directly within the main agent (or via dlmod) is probably the most efficient and reliable (since there's minimal overheads between the code implementing the MIB module, and the agent framework). But it does assume that there's a suitable mechanism for retrieving the necessary information.
If the new MIB is monitoring or managing some other subsystem, external
to the agent, then it may be necessary to embed a subagent within the
subsystem itself - particularly if there's no suitable public API to
retrieve the necessary information. In this case, AgentX is probably
the most appropriate way forward.
Unless you prefer to implement the missing public management API,
and develop a module within the main agent instead.
In terms of writing C code for the Net-SNMP agent, the way that the
(sub-)agent receives the request is more or less irrelevant. The
MIB module API was deliberately designed to be independent of any
extension mechanism being used - so the exact same module code could
be included as part of a pure-SNMP master agent, or an AgentX subagent,
either compiled in or dynamically loaded. No modifications should be
needed to the MIB module code itself - just to how it's compiled into
the appropriate application.
FAQ:Agent
- What MIBs are supported?
- What protocols are supported?
- How do I configure the agent?
- How do I remove a MIB from the agent?
- I've installed a new MIB file. Why can't I query it?
- How do I add a MIB to the agent?
- What's the difference between 'exec', 'sh' and 'pass'?
- What's the difference between AgentX, SMUX and proxied SNMP?
- What about 'dlmod' - what's that about?
- Which should I use?
- Can I use AgentX when running under Windows?
- Can I use AgentX (or an embedded SNMP agent) in a threaded application?
- How can I run AgentX with a different socket address?
- How can I turn off SMUX support?
- How can I combine two copies of the 'mib2' tree from separate subagents?
- What traps are sent by the agent?
- Where are these traps sent to?
- How can I send a particular trap to selected destinations?
- When I run the agent it runs and then quits without staying around. Why?
- After a while the agent stops responding, and starts eating CPU time. Why?
- How can I stop other people getting at my agent?
- How can I listen on just one particular interface?
- How do I configure access control?
- I don't understand the new access control stuff - what does it mean?
- How do I configure SNMPv3 users?
- The 'createUser' line disappears when I start the agent. Why?
- What's the difference between /var/net-snmp and /usr/local/share/snmp?
- My new agent is ignoring the old snmpd.conf file. Why?
- Why am I getting "Connection refused"?
- Why can't I see values in the UCDavis 'extensible' or 'disk' trees?
- Why can't I see values in the UCDavis 'memory' or 'vmstat' tree?
- What do the CPU statistics mean - is this the load average?
- How do I get percentage CPU utilization using ssCpuRawIdle?
- What about multi-processor systems?
- The speed/type of my network interfaces is wrong - how can I fix it?
- The interface statistics for my subinterfaces are all zero - why?
- Does the agent support the RMON-MIB?
- What does "klread: bad address" mean?
- What does "nlist err: wombat not found" (or similar) mean?
- How about "Can't open /dev/kmem"?
- The agent is complaining about 'snmpd.conf'. Where is this?
- The system uptime (sysUpTime) returned is wrong!
- Can the agent run multi-threaded?
