1 Reply Latest reply on Feb 11, 2010 8:47 AM by mazz

    How to use the JMX-plugin?

    Thomas Chang Apprentice

      I downloaded a jmx-plugin example from "http://support.rhq-project.org/display/RHQ/Plugins+-+Demos+-+Writing+Custom+JMX+Plugin". I uploaded the "custom-jmx-plugin-1.0-SNAPSHOT.jar" in JON-Admin-Console to the JON server and this is successful. I can also see this plugin is listed in the plugin table.


      According to the demo I can see this jar in "Auto-Discovery" in Jon-Admin-Console. But I can't. Why?


      Besides, I read the docu "Prepare the RHQ Server to use your custom plugin"

      under "http://support.rhq-project.org/display/RHQ/Writing+Custom+Plugins#WritingCustomPlugins-PreparetheRHQServertouseyourcustomplugin", I wonder how can I know if I can use the plugin or not?

        • 1. Re: How to use the JMX-plugin?
          mazz Master

          You won't see the PLUGIN itself in the auto-discovery window. You will see JMX servers that can be managed in there. But if your JMX plugin can't auto-detect anything out there that has a remote JMX MBeanServer, you will not see anything.


          Are you going through the exact demo, with the demo's JMX example app? If so, it should be started with the JVM command line options needed to start the JMX platform MBeanServer with its remote interface opened up.


          Download the source code used by the demo, and look at the start script at /jmx-app/prebuilt/runjmxapp (this is the path relative to the demo source .zip file that you can download from that demo page). In that start script, you see how the demo starts the JMX app with the remote JMX MBeanServer remoted:


          java -Dcom.sun.management.jmxremote.port=19988 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar jmxapp.jar


          BTW: This blog talks about this JMX management stuff some more: http://management-platform.blogspot.com/2008/11/monitoring-custom-jmx-mbeans-with-jopr.html