org.rhq.plugins.jmx
Class JMXDiscoveryComponent
java.lang.Object
org.rhq.plugins.jmx.JMXDiscoveryComponent
- All Implemented Interfaces:
- ManualAddFacet, ResourceDiscoveryComponent, ResourceUpgradeFacet
public class JMXDiscoveryComponent
- extends Object
- implements ResourceDiscoveryComponent, ManualAddFacet, ResourceUpgradeFacet
This component will discover JVM processes that appear to be long-running (i.e. "servers"). Specifically, it will
discover java processes that:
- have enabled JMX Remoting (JSR-160) via com.sun.management.jmxremote* system properties on their command lines, or
- 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 either must be running as the same user as the RHQ Agent,
or the Agent must be running as root
-
Some other java processes that do not meet these criteria can be manually added if they expose JMX remotely in
another supported form (WebLogic, WebSphere, etc.).
- Author:
- Greg Hinkle, Ian Springer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMMAND_LINE_CONFIG_PROPERTY
public static final String COMMAND_LINE_CONFIG_PROPERTY
- See Also:
- Constant Field Values
CONNECTOR_ADDRESS_CONFIG_PROPERTY
public static final String CONNECTOR_ADDRESS_CONFIG_PROPERTY
- See Also:
- Constant Field Values
INSTALL_URI
public static final String INSTALL_URI
- See Also:
- Constant Field Values
CONNECTION_TYPE
public static final String CONNECTION_TYPE
- See Also:
- Constant Field Values
PARENT_TYPE
public static final String PARENT_TYPE
- See Also:
- Constant Field Values
ADDITIONAL_CLASSPATH_ENTRIES
public static final String ADDITIONAL_CLASSPATH_ENTRIES
- See Also:
- Constant Field Values
SYSPROP_RHQ_RESOURCE_KEY
public static final String SYSPROP_RHQ_RESOURCE_KEY
- See Also:
- Constant Field Values
JMXDiscoveryComponent
public JMXDiscoveryComponent()
discoverResources
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context)
- Specified by:
discoverResources in interface ResourceDiscoveryComponent
getProcessExcludes
protected Set<String> getProcessExcludes()
discoverResource
public DiscoveredResourceDetails discoverResource(org.rhq.core.domain.configuration.Configuration pluginConfig,
ResourceDiscoveryContext discoveryContext)
throws InvalidPluginConfigurationException
- Specified by:
discoverResource in interface ManualAddFacet
- Throws:
InvalidPluginConfigurationException
getAdditionalClasspathUrls
public List<URL> getAdditionalClasspathUrls(ResourceDiscoveryContext<ResourceComponent<?>> context,
DiscoveredResourceDetails details)
throws Exception
- Throws:
Exception
upgrade
public org.rhq.core.domain.resource.ResourceUpgradeReport upgrade(ResourceUpgradeContext inventoriedResource)
- Specified by:
upgrade in interface ResourceUpgradeFacet
discoverResourceDetails
protected DiscoveredResourceDetails discoverResourceDetails(ResourceDiscoveryContext context,
ProcessInfo process)
buildResourceDetails
protected DiscoveredResourceDetails buildResourceDetails(ResourceDiscoveryContext context,
ProcessInfo process,
JMXServiceURL jmxServiceURL,
Integer jmxRemotingPort)
getJavaMainClassName
protected String getJavaMainClassName(ProcessInfo process)
getJmxRemotingPort
protected Integer getJmxRemotingPort(ProcessInfo process)
getSystemPropertyValue
protected String getSystemPropertyValue(ProcessInfo process,
String systemPropertyName)
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.