Skip to content

Apache Tomcat


This ZenPack allows you to monitor the Tomcat Application Server. Tomcat is a Web application container that conforms to many parts of the J2EE Specification.


This ZenPack is developed and supported by Zenoss Inc. Commercial ZenPacks are available to Zenoss commercial customers only. Contact Zenoss to request more information regarding this or any other ZenPacks. Click here to view all available Zenoss Commercial ZenPacks.


This ZenPack is included with commercial versions of Zenoss and enterprise support for this ZenPack is provided to Zenoss customers with an active subscription.


Version 2.3.0- Download

  • Compatible with Zenoss Resource Manager 4.2.x, Zenoss Resource Manager 5.0.x


The ZenPacks.zenoss.TomcatMonitor ZenPack monitors Apache Tomcat servers.

Tomcat is a Web application container that conforms to many parts of the J2EE Specification.

This ZenPack focuses on the metrics that Tomcat updates in its internal MBean container that is accessible via the remote JMX API. These metrics focus on attributes that relate to the servicing of web pages and primarily include thread pool size, CPU use, available file descriptors, JSP and servlet counts, and request counts.

This ZenPack places much emphasis on monitoring thread status because every web request is serviced in a separate thread. Each thread requires file descriptors to be maintained, and thus those are monitored as well. The amount of CPU time spent servicing each thread is also captured and reported.

This ZenPack also reports on the number of times JSPs and Servlets are reloaded. This metric can be useful in highly dynamic sites where JSPs or Servlets change on the fly and need to be reloaded periodically. Monitoring of this metric can lead to the identification of small "Reloading Storms" before they cause production outages.

The amount of time Tomcat spends servicing a request is also recorded. This extremely high level metric can provide insight into downstream systems that are not monitored. If all the Tomcat resources are within normal tolerances but processing time suddenly spikes it can be an indication that a back-end service (such as a database or another web service) is misbehaving.

The following metrics can be collected and graphed:

  • Tomcat cache (accesses vs hits)
  • Daemon and User thread count
  • Overall CPU time
  • Global Request Traffic: bytes sent/received
  • Global Request Traffic: request count and error count
  • Global Request processing time
  • JSP/Servlet reload time
  • Servlet class loading and processing time
  • Servlet request and error count

Tip: The more extensive JBoss Application Server uses Tomcat as a Web Application engine to manage web applications deployed inside enterprise applications within JBoss. As a result, this ZenPack can be used to monitor Tomcat MBeans that are active within JBoss.


Prerequisite Restriction
Product Zenoss platform 4.x, Zenoss 2.2 or higher
Required ZenPacks ZenPacks.zenoss.ZenJMX

Configuring Tomcat to Allow JMX Queries

Before running the Tomcat bin/ script, run the following to allow unsecured queries against the Tomcat server:

export JAVA_OPTS

The same JAVA_OPTS approach can be used to enable remote access to Tomcat MBeans. Set the JAVA_OPTS variable as illustrated above and then execute the ./ start command in the ${TOMCAT_HOME}/bin directory.

Note: Tomcat 6.0.14's does not process the stop command properly when the JAVA_OPTS variable is set. We recommend using two separate shell scripts when troubleshooting JMX problems in Tomcat: one for starting Tomcat (with the JAVA_OPTS variable set) and a different one for stopping Tomcat (where the JAVA_OPTS variable is not set).

If you add the above lines to the to bin/ (as seems to be the logical thing to do in to get the environment variables set up), the bin/ script will get those same environment variables. This will cause the script to attempt to bind to the ports, fail, and then not stop Apache Tomcat.

Configuring Zenoss platform

All Apache Tomcat services must have a device entry under the /Devices/Server/Tomcat device class.

Note: The zenjmx daemon must be configured and running. See for more information about configuring the zenjmx daemon with the Sun JRE tools.

  1. Navigate to the device or device class under the /Devices/Server/Tomcat device class in the Zenoss platform interface.
    • If applying changes to a device class:
      1. Select the class in the devices hierarchy.
      2. Click Details.
      3. Select Configuration Properties.
    • If applying changes to a device:
      1. Click the device in the device list.
      2. Select Configuration Properties.
  2. Edit the appropriate configuration properties for the device or devices.

    Tomcat Configuration Properties

    Name Description
    zTomcatJ2EEApplicationName Used to construct MBean names for a specific application deployed on Tomcat, typically used for JSP and Servlet statistics.
    zTomcatJ2EEServerName Used to construct MBean names for a specific application deployed on Tomcat, typically used for JSP and Servlet statistics.
    zTomcatJmxManagementAuthenticate This configuration property is deprecated.
    zTomcatJmxManagementPassword JMX password.
    zTomcatJmxManagementPort The port number used to gather JMX information.
    zTomcatJmxManagementUsername JMX username for authentication.
    zTomcatListenHost The hostname on which Tomcat is listening for web requests. This is used to construct MBean names.
    zTomcatListenPort The Tomcat connector, which is a port and protocol (http, jk...) that Tomcat is listening on. This is used to construct MBean names that monitor bytes, error and requests on that connector.
    zTomcatServletName Specific Servlet name to monitor.
    zTomcatServletUri URI of Servlet to monitor.
    zTomcatWebAppUri URI path for a Tomcat web application. Used to construct MBean names.
  3. Click Save to save your changes. You will now be able to start collecting the Tomcat server metrics from this device.

  4. Navigate to Graphs and you should see some placeholders for performance graphs. After approximately fifteen minutes you should see the graphs start to become populated with information.

Tip: The out-of-the-box TomcatMonitor data source configuration has been defined at the macro level, but can be configured to operate on a more granular basis. For example, the Servlet Reload Count applies to all servlets in all web applications but it could be narrowed to be Servlet /submitOrder in web application "production server".

Change the Amount of Data Collected and Graphed

  1. Navigate to the device or device class under the /Devices/Server/Tomcat device class in the Zenoss platform interface.
  2. From the left panel, select Monitoring Templates.
  3. From the Action menu, select Bind Templates.
  4. Move one or more templates to Selected, and then click Save.

    Tomcat Templates

    Name Description
    Tomcat Cache Cache information about a specific Web application deployed.
    Tomcat Core Core information about any Tomcat server: memory usage, threads, uptime, etc.
    Tomcat Global Request Processor Connection information over a Tomcat connector: bytes, errors, requests.
    Tomcat JSPS Metrics about a specific JSP page.
    Tomcat Servlet Metrics about a specific Servlet.
    Tomcat Thread Pool Threadpool metrics measured per Tomcat connector.
    Tomcat Web Module Processing time metrics for a Web module.
  5. Click the OK button to save your changes.

Viewing Raw Data



Type Name
Performance Collector zenjmx