mduafala(7 posts since Oct 12, 2010) Oct 12, 2010 3:24 PM
Currently Being Moderated
I'm trying to expose my current services to hyperic for monitoring. I have wrapped my current metrics info in MXBeans (and I can view those in visual vm just fine). I then followed the jmx plugin tutorial (http://support.hyperic.com/display/DOC/JMX+Plugin+Tutorial) to create my custom plugin. I copied the plugin to both the server and client installations (which are on different machines). I know that they are being seen, I as there are messages in the logs saying they are being loaded.
The problem is that, I can't seem to get the agent to actually expose the beans. I'm testing the agent only, using this invocation java -jar ~/Downloads/hyperic-hq-agent-4.4.0/bundles/agent-4.4.0-1509/pdk/lib/hq-product.jar -Dplugins.include=webobjects -Dlog=debug -m discover -a metric -Dproc.java.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/
I see the built in metrics returned (thread count, gc info etc), but my mbeans are not shown. I'm stumped as to how to debug this any further. I'm hoping that more experience eyes will see what the missing piece is.
the problem i see with your plugin is that you are not adding any metrics for your bean. only properties you have: <service name="MyApp"> <plugin type="autoinventory"/> <property name="OBJECT_NAME" value="AOS:type=*,name=*"/> <property name="OBJECT_NAME" value="AOS:type=Gauge-StatsMemoryUsed"/> </service>
it isn't clear in the tutorial, but what they are doing is setting the OBJECT_NAME for each MBean they are monitoring, then including one of their <metrics> tags from the top to create a metric for each attribute from the MBean.
for instance, if you had a bean with an ObjectName = "AOS:name=Foo" and it had an attribute named "Bar", your service would look like this: <service name="MyApp"> <plugin type="autoinventory"/> <property name="OBJECT_NAME" value="AOS:name=Foo"/> <metric name="Availablility" indicator="true"/> <metric name="Bar" indicator="true" defaultOn="true"/> </service>
this should find your service and you should have 2 metrics available: Availability and Bar.