Tomcat plugin

This plugin  monitors, visualizes, and alerts on your Apache Tomcat web server.

Prerequisites

Meter 4.2 or later must be installed.

The Apache Tomcat server plugin supports the following Operating Systems.

Linux(tick)
Windows(tick)
OS X(tick)

Plugin setup

In order for the plugin to collect statistics from Tomcat you need to:

Configure JMX endpoint for Tomcat

 On Windows (if Tomcat is running as service):

Enable Apache Service Manager (commons daemon service manager) for the installed service using the command:   tomcat7w.exe

This should start Apache Service Monitor program on your system tray. Click on its icon. Select the Java tab and append the following on the Java Options text box, one option per line (This assumes the JMX endpoint is 8999 of your localhost):
-Dcom.sun.management.jmxremote.port=8999
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false


Set the CATALINA_OPTS environment variable

On Windows

set CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8999
-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=localhost"

On Linux and OS X

$ CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8999
-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=localhost"
$ export CATALINA_OPTS
Note: To set the environment variable, create setenv.bat or setenv.sh, depending on your operating system, inside CATALINA_HOME/bin and restart the tomcat. If you are monitoring a remote tomcat instance, you need to set
On Windows:        -Djava.rmi.server.hostname=hostname
On Linux & OS X:  -Djava.rmi.server.hostname=$HOSTNAME

If you have set credentials for JMX Port, you have to set
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.password.file=$JAVA_HOME/jre/lib/management/jmxremote.password
-Dcom.sun.management.jmxremote.access.file=$JAVA_HOME/jre/lib/management/jmxremote.access

To install the plugin

  1. From the top right of the screen, perform one of the following actions:
    • Click Settings > Data Collection, select the TrueSight meter, and select the Sources tab.

    • Click Settings > Configure Sources.
  2. Use the search box or scroll through the page to find the source system which has the TrueSight meter on which you want to install the plugin.
  3. Click the name of the source to view source details.
  4. Select the Plugins tab.
  5. Use the search box or scroll through the page to find the plugin you want to install.
  6. Click + Install to start the installation.

    Refer to the following sections for the configuration details required to collect data and view the list of plugin metrics.

Configuration details

Field NameDescription
HostHost of the Tomcat JMX endpoint
PortPort of the Tomcat JMX endpoint. Defaults to 8999
UsernameUsername to access the Tomcat JMX endpoint
PasswordPassword to access the Tomcat JMX endpoint
SourceThe Source to display in the legend for the metrics data. It will default to the hostname of the server.
Poll IntervalHow often should the plugin poll for metrics.

Advanced configuration

To customize this plugin, see Apache Tomcat plugin on GitHub.

Plugin metrics

Metric NameDescription
TOMCAT_JVM_FREE_MEMORYFree memory of the JVM in MBytes
TOMCAT_JVM_TOTAL_MEMORYTotal memory of the JVM in Mbytes
TOMCAT_HTTP_CURRENT_THREAD_COUNTCurrent thread count
TOMCAT_HTTP_CURRENT_THREAD_BUSYCurrent thread busy
TOMCAT_HTTP_MAX_PROCESSING_TIMEMaximum processing time reached for requests (ms)
TOMCAT_HTTP_REQUEST_COUNTTotal numbers of requests counter
TOMCAT_HTTP_ERROR_COUNTTotal numbers of errors counter
TOMCAT_HTTP_BYTES_SENTTotal bytes sent in MB
TOMCAT_HTTP_BYTES_RECEIVEDTotal bytes received in MB
TOMCAT_MEMPOOL_HEAP_EDEN_SPACEEden Space Heap memory pool usage
TOMCAT_MEMPOOL_HEAP_OLD/TENURED_GENOld/Tenured Gen Heap memory pool usage
TOMCAT_MEMPOOL_HEAP_SURVIVOR_SPACESurvivor Space memory pool usage
TOMCAT_MEMPOOL_NONHEAP_PERM_GENCMS Perm Gen Non-heap memory pool usage
TOMCAT_MEMPOOL_NONHEAP_METASPACEMetaspace Non-heap memory pool usage
TOMCAT_MEMPOOL_NONHEAP_CODE_CACHECode Cache memory pool usage
Was this page helpful? Yes No Submitting... Thank you

Comments