Follow

Apache Tomcat Plugin

Monitor, visualize and alert on your Apache Tomcat web server in one-second intervals with this TrueSight Pulse Apache Tomcat API plugin.

You may also refer to this video for a recorded walk through of the install and configuration process.

Prerequisites
  • Supported OS: Linux, Windows, OS X
  • TrueSight Pulse meter 4.2 or later
To install new meter go to 'Settings-> Installation' or see instructions.
To upgrade the meter to the latest version see instructions
 
Metrics Collected:
  • TOMCAT_JVM_FREE_MEMORY
  • TOMCAT_JVM_TOTAL_MEMORY
  • TOMCAT_HTTP_CURRENT_THREAD_COUNT
  • TOMCAT_HTTP_CURRENT_THREAD_BUSY
  • TOMCAT_HTTP_MAX_PROCESSING_TIME
  • TOMCAT_HTTP_REQUEST_COUNT
  • TOMCAT_HTTP_ERROR_COUNT
  • TOMCAT_HTTP_BYTES_SENT
  • TOMCAT_HTTP_BYTES_RECEIVED
  • TOMCAT_MEMPOOL_HEAP_EDEN_SPACE
  • TOMCAT_MEMPOOL_HEAP_OLD/TENURED_GEN
  • TOMCAT_MEMPOOL_HEAP_SURVIVOR_SPACE
  • TOMCAT_MEMPOOL_NONHEAP_PERM_GEN
  • TOMCAT_MEMPOOL_NONHEAP_METASPACE
  • TOMCAT_MEMPOOL_NONHEAP_CODE_CACHE
 
How To Install Apache Tomcat Plugin
 
Plugin Setup
In order for the plugin to collect statistics from Tomcat you need to:
 
A) Configure JMX endpoint for Tomcat installed.
 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 on the 'Java' tab and append the following on the 'Java Options' text box, one option per line (note - assuming JMX endpoint as 8999 of your localhost):
-Dcom.sun.management.jmxremote.port=8999
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
 

B) 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 & 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

NB: To set the above mentioned environment variable, you can create setenv.bat or setenv.sh, depending on your OS, inside CATALINA_HOME/bin and restart the tomcat. If you are monitoring a remote tomcat instance, in that case, 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, in that case 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
 
 
Once steps A and B have completed you can now install the plugin.
 
1) Log into the BMC TrueSight Pulse console.
 
2) Go to Settings > Plugins
 
3) Click on 'Get Plugins'.
 
4) Scroll to 'tomcat' and click 'Install'.
 
 
5) Next, Pulse will provide a list of meters to associate to the plugin.  Please select a meter.  Now an "Add a plugin..." drop down box will display.  Please click and select 'tomcat':
 
6) You will be prompted to "Add an Instance".
 
7) You can select default settings or update per your configuration. The "Source" value is the name to display in the legend for the metrics data. It will default to the hostname of the server.  Click "OK".
 
 
8) The following dashboards will be created:
  • Tomcat HTTP Service
  • Tomcat Memory Pool
9) Sample Tomcat HTTP Service output:
 
 
 
Have more questions? Submit a request