Template:FAQ:Agent 15
This is the purpose of the SNMPv3 'context' field. Register the MIB module a second time in a non-default context (see the relevant entry in the CODING section for details), and specify this context when querying the agent. The MIB module can use this context information to determine which set of information to report.
Or you could register two completely different handlers for the same OID (using different contexts), and the agent will invoke the appropriate code. This holds for both MIB modules implemented within the main agent, or AgentX subagents - the same approach will work for both.
Contexts can also be used with proxied SNMP requests - just specify
the option '-Cn {context}'
as part of the "proxy"
entry. See the
'snmpd.conf(5)'
man page for details.
It's currently not possible to support parallel MIB trees when using SNMPv1 or SNMPv2c. In principle, it should be possible to use the community string in a similar way, but this has not (yet) been implemented.
This mechanism is only available with the v5 Net-SNMP agent. The v4 UCD agent does not support contexts at all. Sorry about that.
Another way to handle this would be to tweak one of the subagents to
use a different set of (non-standard) OID assignments - perhaps by
relocating the whole of the subtree to another (private) OID. This
is not ideal, but should work with all configurations.