VMware Cloud Community
feschuck
Contributor
Contributor

Simple JMX plugin: problems with auto-inventory

Hi,

i wrote a simple JMX plugin, which measures a simple MBean.
That is working properly.

code example:
-----------------------------------------------
<?xml version="1.0"?>

<!DOCTYPE plugin [<!ENTITY process-metrics SYSTEM "/pdk/plugins/process-metrics.xml">]>

<plugin package="org.hyperic.hq.plugin.java">

<service name="MBean Counter" server="Sun JVM" version="1.5">
<property name="OBJECT_NAME" value="counter.name:type=Counter"/>

<plugin type="measurement" class="org.hyperic.hq.product.jmx.MxMeasurementPlugin"/>
<plugin type="control" class="org.hyperic.hq.product.jmx.MxControlPlugin"/>

<!-- <plugin type="autoinventory"/> -->

<metric name="Count2"
template="${OBJECT_NAME}:Count"
collectionType="dynamic"
indicator="false"/>

<actions include="quit,resetCount,sumUp,printCount,retInt,retString"/>
</service>
</plugin>
-----------------------------------------------

That is working well by manual adding the service to the java VM.

The problem is when i uncomment the autoinventory and let the service add by itself then the service isn't working. The availibilty is always grey and i dont get any metrics.
But the quick control over JMX is still working.

Any suggestion what i can do?

Message was edited by: feschuck
Reply
0 Kudos
4 Replies
feschuck
Contributor
Contributor

Ok now it is working. No idea what was going wrong yesterday.
I didn't change anything since yesterday.
Reply
0 Kudos
Meyssen
Contributor
Contributor

Hi;

I need to write a JVM Plugin on hyperic that collect some metrics like : Threads stacktrace, GC ...

I saw some docs for this but its not clear ; can you help me to do this ? can i see your plugin ? what i have to do to write and deploy it ?

PlZ Help !
Reply
0 Kudos
feschuck
Contributor
Contributor

There should be already a support for JVM. But it wont be auto discovered. You have to add it manual as an server on your plattform. The server name ist "Sun JVM 1.5". You have to setup up which java.exe and the JMX address.
Then Hyperics finds the GC by himself.
Reply
0 Kudos
Meyssen
Contributor
Contributor

Thank you for replyin !

i know that GC is collected by Hyperic ! what about Thread stackTrace ??
how can i customize the plugin ? or write it ? the exemples showed on docs are not suffisent ! 😞
Reply
0 Kudos