vCenter

 View Only
  • 1.  Simple JMX plugin: problems with auto-inventory

    Posted Sep 07, 2011 01:33 PM
    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


  • 2.  RE: Simple JMX plugin: problems with auto-inventory

    Posted Sep 08, 2011 06:32 AM
    Ok now it is working. No idea what was going wrong yesterday.
    I didn't change anything since yesterday.


  • 3.  RE: Simple JMX plugin: problems with auto-inventory

    Posted Sep 08, 2011 10:27 AM
    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 !


  • 4.  RE: Simple JMX plugin: problems with auto-inventory

    Posted Sep 08, 2011 10:54 AM
    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.


  • 5.  RE: Simple JMX plugin: problems with auto-inventory

    Posted Sep 08, 2011 08:43 PM
    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 ! :(