Question

I'm looking for a simple java example that actively sends SNMP stats to an SNMP Manager using the J2EE-MIB or the JVM-MANAGEMENT-MIB. My intent is to use SNMP4j against CA Spectrum, but any Java API against any generic SNMP manager is fine. I'm comfortable sending simple traps, but I'm unsure on how to proceed using a more complex MIB and how to specify dynamic groups. For example, the J2EE-MIB defines JDBC Pool metrics, but the individual metrics must somehow be associated to a pool name.

Thanks in advance !

Was it helpful?

Solution

SNMP4J-AgentJMX has a built-in support for the JVM-MANAGEMENT-MIB.

I would not recommend (discourage from) using traps to send the whole contents of a MIB specification. Instead you should use the trap-directed-polling approach (can be found in FAQ of comp.protocols.snmp).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top