VMware vSphere

 View Only
  • 1.  Monitoring Java process and Java version 6

    Posted Dec 30, 2009 05:36 PM
    Hi,

    I'm sure this question has been asked but is there any way to monitor a standalone Java process that is running Java version 6?

    I saw that default installation contains JVM 1.5 monitoring. So, does that mean Hyperic will auto detect any standalone Java process that is running on Java 5?

    Someone asked the same question on this thread http://communities.vmware.com/message/1939794#1939794,
    but I'm confused on the references to the documentation.

    Is my assumption of creating a platform service for JVM 1.6 to detect standalone process Java version 6 correct?

    Also, I'm not sure why the latest Hyperic did not include JVM 1.6. I would think that is a standard service.

    Thanks for the help.


  • 2.  RE: Monitoring Java process and Java version 6

    Posted Dec 30, 2009 07:03 PM
    Hi,

    you are right you have to create a platform service JVM 1.5 to monitor your JVM Version 1.6.
    Please make sure that JMX is enabled, for example by using the following parameters when you start up your Java Virtual Machine:

    -Dcom.sun.management.jmxremote \
    -Dcom.sun.management.jmxremote.port=6969 \
    -Dcom.sun.management.jmxremote.ssl=false \
    -Dcom.sun.management.jmxremote.authenticate=false $JAVA_OPTS


    It is probably a little bit misleading, that the name of the Java plugin is JVM 1.5. I think it works quite well with Java 1.6.



    Cheers,
    Mirko


  • 3.  RE: Monitoring Java process and Java version 6

    Posted Dec 30, 2009 07:19 PM
    Thank you excowboy. That was helpful.

    So, am I correct to assume that all standalone Java process that enables JMX with the options you listed below will be detected by Hyperic?

    Isn't JVM 1.5 already a platform service in the default installation?
    Also, you are saying JVM 1.5 will automatically detect JVM Version 1.6 also?

    Thank you again.


  • 4.  RE: Monitoring Java process and Java version 6

    Posted Dec 30, 2009 09:34 PM
    You will have to add the platform service for each Java Virtual Machine manually if you want to use the default JVM 1.5 plugin.
    But if you have a bunch of servers, running all the same Java application it makes probably sense to write a custom plugin. You could do Process and JMX monitoring and use autodiscovery.

    I think the Cruisecontrol plugin is a good example:

    http://svn.hyperic.org/projects/hq/trunk/plugins/examples/cruisecontrol-plugin.xml

    Have a look at the plugin and you can see the following references to enable autodiscovery and JMX measurement:

    <plugin type="autoinventory"
    class="org.hyperic.hq.product.jmx.MxServerDetector"/>

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

    Mirko