This agent returns performance metrics for an Apache Tomcat server. In order to gain access to the JMX data, the server needs to be started using the following JVM parameters:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9999
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
These parameters can be added by editing the catalina.bat or catalina.sh in the bin folder of the Tomcat installation folder. Add the line highlighted in the example below.
if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuli
set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
:noJuli
set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
rem ----- Execute The Requested Command ---------------------------------------
This agent is available since v1.1.
The agent supports both local and remote modes.
The agent supports Tomcat versions 5.x and 6.x.
The following configuration options are available:
Usually the only parameter that needs to be set is the connection string. The value must be JSR160 URL (e.g. service:jmx:rmi:///jndi/rmi://{host}:9999/jmxrmi)
All data available from Tomcat via JMX is accessible; the runtime data is not structured but dashboards are provided that contain the most useful data views. Note that in order to get the content to refresh you need to set up an entity refresh interval on the Catalina entity (see the screenshot below).