How can I combine two copies of the mib2 tree from separate subagents?
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 onl