On 18 August 2011 20:01, Alan Evans <alanwev...@gmail.com> wrote: > I actually have my com2sec and proxy lines setup already. I can proxy > to the two JVMs on the Java Management MIB. The problem is that the > Java Management Agent does not provide the system MIB .1.3.6.1.2.1.1 > so I would like to return that from the local host.
> > NOT WORKING: snmpwalk -v2c -c public-jvm1 localhost .1.3.6.1.2.1.1 # > Return system MIB from host, not JVM 1 or 2 > NOT WORKING: snmpwalk -v2c -c public-jvm2 localhost .1.3.6.1.2.1.1 # > Return system MIB from host, not JVM 1 or 2 The simplest solution (if you're happy/able to tweak the code and recompile) would be to amend the init_system_mib() routine to invoke each netsnmp_register_xxx call several times - once per context. The code should probably look something like (untested!): netsnmp_handler_registration *reg; : reg = netsnmp_create_handler_registration( ... ); netsnmp_register_watched_scalar( reg, netsnmp_init_watcher_info(...)); reg->contextName = "public-jvm1-context"; netsnmp_register_watched_scalar( reg, netsnmp_init_watcher_info(...)); reg->contextName = "public-jvm2-context"; netsnmp_register_watched_scalar( reg, netsnmp_init_watcher_info(...)); repeated for each individual MIB object. You'll probably have to play about a bit to get the exact invocation (and I'm not sure whether it's necessary to initialise the watcher structure each time, or not). But that should give the basic idea. Dave ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users