VMware Cloud Community
Brandon_Richins
Contributor
Contributor

Remote JMX monitoring

I am trying to remotely monitor some JMX enabled applications. I have read the JMX documentation and tried the below custom plugin XML. When I run the command line tool to discover the services, java -jar lib/hq-product.jar -Djmx.sun.discover=true -Dplugins.include=jmx,whatever -m discover -a metric -Dlog=debug, it works fine on the local machine where the JVM is running, but it fails from a remote machine. What am I missing?

<plugin>
<classpath>
<include name="pdk/lib/mx4j"/>
</classpath>
<service name="Beginners JMX" server="Sun JVM" version="1.5">
<property name="OBJECT_NAME" value="java.lang:type=OperatingSystem"/>
<plugin type="autoinventory" />
<plugin type="measurement" class="org.hyperic.hq.product.jmx.MxMeasurementPlugin"/>
<config name="jmx" type="global">
<option name="jmx.url" description="JMX URL to MBeanServer" default="service:jmx:rmi:///jndi/rmi://ecis197.eng.med.ge.com:8888/jmxrmi"/>
<option name="jmx.username" description="JMX username" optional="true" default=""/>
<option name="jmx.password" description="JMX password" optional="true" default="" type="secret"/>
</config>
<filter name="template" value="${OBJECT_NAME}:${alias}"/>

<metric name="Availability" template="${OBJECT_NAME}:Availability" indicator="true"/>

<metric name="Num Procs" alias="AvailableProcessors" collectionType="trendsup" indicator="true"/>
<metric name="Open FD Count" alias="OpenFileDescriptorCount" collectionType="trendsup" indicator="true"/>
<metric name="LoadAverage" alias="SystemLoadAverage"/>
</service>
</plugin>
0 Kudos
4 Replies
excowboy
Virtuoso
Virtuoso

Hi Brandon,

a snippet from documentation:
This screen allows users to initiate an auto-discovery scan — either an Auto Scan or a File Scan — on a platform. In order to scan a platform, an Agent must be installed on the platform. (An exception is network devices and network hosts, which can be scanned but do not have Agents on them. In those cases, the connection is proxied through a machine with an Agent running on it.)

http://support.hyperic.com/display/DOC/ui-Inventory.AutoDiscovery

According to the documentation you can not autodiscover a remote JMX service.
So you can either install the Agent on every host you'd like monitor or you may deploy your plugin manually multiple times as a platform server.

hth,
Mirko
BC_hyperic
Enthusiast
Enthusiast

0 Kudos
Brandon_Richins
Contributor
Contributor

Unfortunately I cannot install the agent on the platform because it is HP NonStop and doesn't seem to be supported yet. You mentioned that I could deploy the plug-in manually multiple times as a platform server. Can that still be done with the JMX XML based plug-in? Could you point me to any examples? I've looked in the JMX section but I'm just not seeing it. I'm also guessing that I may not be able to test it with the same command line client.

I think I can get around the auto-discovery problem with the Groovy console in HQ to simplify the configuration and setup. I was hoping that the custom JMX monitoring might be setup similarly to the HTTP Slashdot demonstration in the online tutorial.
0 Kudos
excowboy
Virtuoso
Virtuoso

Hi Brandon,


>I was hoping that the custom JMX monitoring might be setup similarly to the HTTP Slashdot >demonstration in the online tutorial.

Yes, that was my idea too. If you deploy your plugin on HQ Server and on an Agent the plugin should be available in the list of "New Server". If you create a HTTP service you choose "New Service" in this case you choose "New Server".

Before you deploy your custom JMX plugin, you could try to create a simple JMX Server.
For details please read the following page:
http://support.hyperic.com/display/hypcomm/Sun+JVM

hth,
Mirko
0 Kudos