JBoss Community Archive (Read Only)

RHQ 4.9

Generic JVM Product Configuration


Arbitrary java processes can be auto-discovered or manually imported into RHQ inventory, but only java processes that meet certain conditions will be auto-discovered.


RHQ can auto-discover java processes that satisfy at least one of the following conditions:

  • have enabled JMX Remoting (JSR-160) by specifying the com.sun.management.jmxremote.port System property on their command lines, e.g.:

    java ... -Dcom.sun.management.jmxremote.port=12345 com.xyz.MyAppMain
  • are Sun/Oracle-compatible java processes accessible via the com.sun.tools.attach API AND specify the
    org.rhq.resourceKey system property on their command lines (e.g. -Dorg.rhq.resourceKey=FOO); the attach API uses IPC
    under the covers, so for a process to be accessible, it must be running as the same user as the RHQ Agent; even
    if the Agent is running as root, java processes running as other users cannot be accessed via the attach API

    java ... -Dorg.rhq.resourceKey=FOO com.xyz.MyAppMain

Discovered JVM's will be represented as [JOPR2:JMX Server] Resources. Each JMX Server Resource will have a number of singleton child Resources corresponding to various JVM subsystems - memory management, threading, logging, etc.

Excluded java Processes

JVM's running RHQ Agent, JBoss AS, or Tomcat will not be auto-discovered as JMX Servers, since they are represented by more specific Resource types defined in their respective plugins (RHQ Agent JVM, JBoss AS JVM, and Tomcat JVM).

If you wish to exclude additional java processes from being auto-discovered, you can set the rhq.jmxplugin.process-filters System property when starting the Agent. The value of this property is a comma-separated list of strings. If a java process's command line contains one of the strings, it will be excluded. For example, the following line could be added to <RHQ_AGENT_HOME>/bin/rhq-agent-env.sh to exclude com.abc.OtherAppMain processes, in addition to RHQ Agent, JBoss AS, and Tomcat processes:


To exclude all java processes, effectively disabling autodiscovery of JVM's, the following line could be added:


Manual Import

Other java processes that do not meet these criteria can be manually imported via the RHQ GUI if they expose JMX remotely in
another supported form (WebLogic, WebSphere, etc.). To manually add a JVM, go to the target platform Resource, right click on the platform in the Resource tree, and select Import > JMX Server. The connection properties you will need to supply will vary depending on the type of JMX connection that will be used to connect to the JVM being imported, but in most cases, you will at least need to enter values for the type, connectorAddress, and installURI properties.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 08:49:36 UTC, last content change 2013-09-18 19:42:26 UTC.