开发者

How JMX objects are mapped into SNMP OIDs?

I have a standalone Java application written with Apache Camel which I want to monitor via SNMP. I think Camel uses Spring's JMX (@ManagedAttribute, @ManagedResource etc) and I can see various Camel-related objects in JDK jconsole just fine. When I run my app with SNMP enabled:

-Dcom.sun.management.snmp.interface=127.0.0.1
-Dcom.sun.management.snmp.port=16101 
-Dcom.sun.management.snmp.acl=false

I can connect with S开发者_如何学编程NMP browser to it and I can see lots of stuff there as well. So far so good, but in order for me to make use of it I need to know or figure out how JMX objects are being mapped into SNMP OIDs. Is there are way to find out how it's being done or at least by whom - Spring, JVM? Any thoughts?


I'm not 100% sure if the information I found on Google (BTW... first hit eh! ;) ) is still relevant nor do I have the means to poke around and verify (corporate, locked down workstation... sigh!) but, it looks like the default SNMP implementation is not very extensible.

According to "JVM Monitoring: JMX or SNMP?" you can only access what is defined in the JVM-MANAGEMENT-MIB.mib

I'd be interested if the matter has changed meanwhile...


I don't think you can just expose your annotated Spring-managed beans via SNMP. The command line parameters you listed were simply for monitoring metrics regarding the JVM itself, see SNMP Monitoring and Management; hence there's probably no way to figure out the OIDs but you have to define them yourself, presumably with another mature SNMP framework or library.


Camel uses the javax.management.MBeanServer to register mbeans. I dont recall we do anything in relation to SNMP. I assume JMX would provide integration for that out of the box, as the JVM has a SNMPAgent that ought to bridge to JMX.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜