In order to collect JMX data from a Tomcat instance using the COSMOS DataCollection engine, the Tomcat instance must first enable remote JMX access. This can be done as follows:
In a command shell, set a JAVA_OPTS environment variable to have the following definitions:
set JAVA_OPTS=-Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
Start Tomcat in this shell. The Tomcat startup script will append these JAVA_OPTS to the startup command line. The tomcat will now support JMX access via port 9999.
If you have TPTP MAX (= Managed Agent eXplorer) installed, you can verify your Tomcat instrumentation by created a managed JMX agent using the profiling support provided by TPTP. Click on the image below to see an example of a configured JMX agent for exploring the root of the tomcat JMX server.
If you don't have MAX installed, you can to a netstat -a to verify that JMX has bound to port 9999.
C:\Documents and Settings\MyWindersBox>netstat -a Active Connections TCP DTW30657N2:8009 DTW30657N2.clients.nasa.cpwr.corp:0 LISTENING TCP DTW30657N2:8888 DTW30657N2.clients.nasa.cpwr.corp:0 LISTENING TCP DTW30657N2:9999 DTW30657N2.clients.nasa.cpwr.corp:0 LISTENING