Template:FAQ:Agent 10

From Net-SNMP Wiki
Jump to: navigation, search

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 that agent might support. Note that the SMUX protocol has essentially been superceded by AgentX, which provides a fuller and more reliable mechanism than either SMUX or proxied SNMP. So ideally, this would be the preferred extension approach. But if the target subagent only supports SMUX or basic SNMP, then that would dictate the extension protocol to use.

Implementing the module in C within the main agent (directly or via dlmod) is probably the most efficient and reliable, closely followed by embedded perl (or python) extensions. These have the advantage of minimal overheads between the code implementing the MIB module, and the agent framework, and no inter-process communication issues. But this 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.
Alternatively, you could implement the missing public management API for that subsystem, and develop a module within the main agent instead.