This example will show you how you could use this to e.g. monitor your Eclipse instance. This basically consists of two steps:
- instrument the target app -- Eclipse in this case
- manually add a JMX server to the RHQ inventory
Step 1: instrument Eclipse
Add the following to eclipse.ini:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=10000
as we don't want for this example password authentication and ssl (of course you should do that for production, but we want to concentrate on how to initiate the connection at all), we disable it by supplying
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
and restart Eclipse afterwards.
This page at Sun explains the various options for JMX remoting in JDK5.
Step 2: Manually add a JMX server in RHQ
Go to the inventory tab of the platform and select "Manually Add": "Jmx Server" below the list of child resources. Press OK
On the next screen select "JDK 5" from the drop down and continue:
The following screen will show prefilled connection properties - here we need to set port 10000 from above:
Click on OK and the new Java VM should appear. After some waiting, you will see the inidividual MBeans as you know it from other services in RHQ:
1 comment:
Is ist possible to call custom MBean operations without writing a plugin?
Post a Comment