3 Replies Latest reply: Oct 18, 2010 3:45 PM by rockwell_hyperic RSS

Custom Monitor plugin not working

mduafala Hot Shot
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.

Thanks,
  Mat
  • 1. Re: Custom Monitor plugin not working
    mduafala Hot Shot
    Currently Being Moderated
    I should also mention that I am able to query the mbeans from within the server, and see the beans.

    i.e. under the views tab for java on my system running the server, I select query mbeans, then I use this as the query string 'AOS:*'
  • 2. Re: Custom Monitor plugin not working
    sv.hyperic Hot Shot
    Currently Being Moderated
    Hi,
       If you got the plugin working. Can you please help me? I have posted a new question on this forum with subject "Issues with Custom Plugin".

    Thanks.
  • 3. Re: Custom Monitor plugin not working
    rockwell_hyperic Hot Shot
    Currently Being Moderated
    Hi,

    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.

    Hope that helps,
    Doug

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 6 points

Share This Page