VMware vSphere

 View Only
  • 1.  Simple JMX Test

    Posted Jun 27, 2007 06:32 AM
    I am currently trying to understand the steps necessary to:
    a) deploy a JMX application
    b) have Hyperic automatically (or manually) pick up the instrumented metrics
    c) set up the Dashboard to view these metrics.

    I have created a simple JMX test application with a single pair of get/set methods. The jar file for the app together with the xml file are both under the hyperic/hq-plugin directory.

    When I attempt to invoke the plugin with the following command:

    java -jar agent-3.0.5/pdk/lib/hq-product.jar -p Simple

    I get the following exception:

    Exception in thread "main" org.hyperic.hq.product.PluginException: Error on line 11 of document : Illegal character at end of document, &amp#x3c;.

    I interpreted the character encoding (&amp#x3c;) as meaning there were mismatched elements in the xml file but that does not seem to be the case. Does any one have any idea which document this exception is referring to, and what &amp#x3c; is?

    A simple, easy-to-understand, complete, step-by-step guide for creating and deploying a JMX enabled java app would be extremely useful; none of the documentation I have encountered on the Hyperic site - "JMX Plugin" guide, "Invoking Plugins Standalone" guide and the PDK page describe the jmx development process simply and clearly.

    Any pointers would be most grateful

    Thank you


  • 2.  RE: Simple JMX Test

    Posted Jul 03, 2007 12:58 AM
    Kon,

    Since you've posted a new thread (MBeanServer Connection Issues), can
    I assume that this has been resolved? What was the resolution?

    -- Jon


    On Jun 26, 2007, at 11:31 PM, kon wrote:

    > I am currently trying to understand the steps necessary to:
    > a) deploy a JMX application
    > b) have Hyperic automatically (or manually) pick up the
    > instrumented metrics
    > c) set up the Dashboard to view these metrics.
    >
    > I have created a simple JMX test application with a single pair of
    > get/set methods. The jar file for the app together with the xml
    > file are both under the hyperic/hq-plugin directory.
    >
    > When I attempt to invoke the plugin with the following command:
    >
    > java -jar agent-3.0.5/pdk/lib/hq-product.jar -p Simple
    >
    > I get the following exception:
    >
    > Exception in thread "main"
    > org.hyperic.hq.product.PluginException: Error on line 11 of
    > document : Illegal character at end of document, &amp#x3c;.

    >
    > I interpreted the character encoding (&amp#x3c;) as meaning there
    > were mismatched elements in the xml file but that does not seem to
    > be the case. Does any one have any idea which document this
    > exception is referring to, and what &amp#x3c; is?
    >
    > A simple, easy-to-understand, complete, step-by-step guide for
    > creating and deploying a JMX enabled java app would be extremely
    > useful; none of the documentation I have encountered on the Hyperic
    > site - "JMX Plugin" guide, "Invoking Plugins Standalone" guide and
    > the PDK page describe the jmx development process simply and clearly.
    >
    > Any pointers would be most grateful
    >
    > Thank you
    >




  • 3.  RE: Simple JMX Test

    Posted Jul 03, 2007 01:07 AM
    The exception was being caused by a separate incomplete xml file in the hq-plugins directory.

    However, I am still encountering some problems with deploying a simple JMX plugin

    The following is still outstanding:

    >I am currently trying to understand the steps necessary to:
    > a) deploy a JMX application
    > b) have Hyperic automatically (or manually) pick up the
    > instrumented metrics
    > c) set up the Dashboard to view these metrics.


  • 4.  RE: Simple JMX Test

    Posted Jul 03, 2007 01:24 AM
    Kon,

    Glad you got it worked out. In the future, please respond to your
    own forum questions if you get it working -- this helps out other
    users and will make sure we are efficient at answering the questions
    which are most important (i.e. not spending time trying to answer
    something that isn't an issue.)

    Have you looked at: http://support.hyperic.com/confluence/display/
    DOCSHQ30/JMX+Plugin ?

    There's a lot of documentation there, specifically addressing some of
    your questions.

    > a) deploy a JMX application

    What do you mean by this? I assume your application is already up
    and running under some container, so please read the section
    entitled, 'Configuring JMX-enabled Applications for Remote Connections'.

    Also, see http://support.hyperic.com/confluence/display/DOCSHQ30/
    Plugin+Development+Center#PluginDevelopmentCenter-deployment

    This will explain how to deploy the plugins to HQ.


    > b) have Hyperic automatically (or manually) pick up the
    > instrumented metrics

    Your metrics will automatically become available when you've created
    the resource. Navigate to your platform, and select 'New Server'
    from the tools menu, to select your plugin. Once you've added it,
    you will be able to configure the metrics.

    > c) set up the Dashboard to view these metrics.

    Please read http://support.hyperic.com/confluence/display/DOC/ui-
    Dashboard

    You are able to setup the dashboard for your custom plugin the same
    way as any other resource.

    -- Jon


    On Jul 2, 2007, at 6:07 PM, kon wrote:

    > The exception was being caused by a separate incomplete xml file in
    > the hq-plugins directory.
    >
    > However, I am still encountering some problems with deploying a
    > simple JMX plugin
    >
    > The following is still outstanding:
    >
    >> I am currently trying to understand the steps necessary to:
    >> a) deploy a JMX application
    >> b) have Hyperic automatically (or manually) pick up the
    >> instrumented metrics
    >> c) set up the Dashboard to view these metrics.
    >




  • 5.  RE: Simple JMX Test

    Posted Jul 03, 2007 01:46 AM
    Thanks, I will take a look at the links you have provided and let you know if I have any further questions ^^


  • 6.  RE: Simple JMX Test

    Posted Jul 04, 2007 12:37 AM
    I've taken a look at the documentation you provided but I am still encountering the same problem with connection to the MBeanServer. I have posted a thread on the issue but have yet to receive any response, please could you take a look when you have some time.

    Thanks


  • 7.  RE: Simple JMX Test

    Posted Jul 05, 2007 08:04 PM
    It's totally dependent on how you've deployed your application. Can
    you connect to your JMX mbeans via JConsole? How is your app
    deployed? In JBoss? Just a regular JVM process?

    -- Jon


    On Jul 3, 2007, at 5:37 PM, kon wrote:

    > I've taken a look at the documentation you provided but I am still
    > encountering the same problem with connection to the MBeanServer. I
    > have posted a thread on the issue but have yet to receive any
    > response, please could you take a look when you have some time.
    >
    > Thanks
    >