Show Table of Contents
2.2. Excluding Java Processes from Discovery
The Generic JMX Plug-in is designed to be extended so that custom plug-ins can be based off it to detect and manage specific types of Java processes. For example, the JBoss ON agent, as a Java process, would normally be detected by the Generic JMX Plug-in, but it is discovered by the Agent Plug-in, which trumps the Generic JMX Plug-in. Similarly, JBoss EAP and Tomcat servers are also discovered by server-specific plug-ins, not the generic plug-in.
Resources which can be discovered by another plug-in should be excluded from the Generic JMX Server discovery, or there could be (spurious) conflict errors recorded in the agent log.
The Java processes to exclude from the discovery scan are defined in the JBoss ON agent configuration. There is a Java option for the agent,
rhq.jmxplugin.process-filters, which lists strings to ignore specifically from the Generic JMX Plug-in discovery scan. If a Java process contains any of the strings in the filter, it is excluded from discovery as a JMX server[1].
The default agent configuration filters out the classes for the agent, the JBoss ON server, and Tomcat servers:
RHQ_AGENT_ADDITIONAL_JAVA_OPTS="-Drhq.jmxplugin.process-filters=org.rhq.enterprise.agent.AgentMain,org.jboss.Main,catalina.startup.Bootstrap"
To add excludes filters:
- Open the agent configuration file.
[jbosson-agent@server ~]$ vim agentRoot/rhq-agent/conf/agent-configuration.xml
- In the
RHQ_AGENT_ADDITIONAL_JAVA_OPTSlink, add the string to exclude to therhq.jmxplugin.process-filtersoption. This can be the classname or any other identifying string which is in the command line for the given process.For example:RHQ_AGENT_ADDITIONAL_JAVA_OPTS="-Drhq.jmxplugin.process-filters=org.rhq.enterprise.agent.AgentMain,org.jboss.Main,catalina.startup.Bootstrap
,com.abc.OtherAppMain"Therhq.jmxplugin.process-filtersvalue is a comma-separated list of strings. - Restart the agent with the
--configoption to load the new configuration.[jbosson-agent@server ~]$ agentRoot/rhq-agent/bin/rhq-agent.sh --config

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.