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 !

有帮助吗?

解决方案

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).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top