Tomcat (JMX) extension

  • Latest Dynatrace
  • Extension
  • Published Oct 27, 2025

Monitor Tomcat connection pools, thread pools, and web request activity using JMX metrics.

Use this extension collects connection pool, thread pool, and web request activity and performance for Tomcat.

Get started

Overview

Apache Tomcat is an open-source web server developed by the Apache Software Foundation (ASF) and one of the most popular servlet containers available today. It’s an incredibly lightweight, flexible and extremely stable platform to build on. The OneAgent will allow you to trace activity on and through your Tomcat applications. Using this JMX extension you'll be able to collect additional key performance data to identify issues and optimize your Tomcat configurations.

Use cases

  • Identify issues with connection pool utilization and activity that could impact your web applications.
  • Optimize your thread and connection pool configurations to increase efficiency while not impacting your application clients.
  • Monitor your web application by viewing web request activity and performance data from Tomcat's perspective in context with other key metrics.

Requirements

To get metric insight:

  1. Install OneAgent on the virtual machine or server of your Tomcat process.
  2. Activate the OneAgent feature Java Metric Extensions 2.0 (JMX).
    • When enabling for the first time each process will need to be restarted for this feature to become active.
  3. In the same tile, select Add to environment to configure the extension.

Compatibility information

The following Mbeans are used for collecting data. If you don't see the metrics, check that the following Mbeans exist using the tool of your choice (e.g. JConsole).

  • Connection pools:
    • Catalina:type=DataSource,name=*,class=*,context=*,host=* or Catalina:type=DataSource,name=*,class=*
  • Thread pools:
    • Catalina:type=ThreadPool,name=*
  • Web request activity
    • Catalina:type=GlobalRequestProcessor,name=*

For connection pools specifically, this extension only supports the standard Tomcat connection pooling implementation with Mbeans under the Catalina domain. It is not uncommon for a different pooling implementation to be used and in these cases you may need to create your own custom JMX extension to collect similar data (if it is available via JMX). You should consult your implementation's documentation or review available Mbeans in your Tomcat process to get started with this.

Details

Metrics are organized into feature sets you can enable/disable as desired.

Additionally, there is one calculated metric included:

  • Average request processing time (func:tomcat.processingTimePerRequest): Request processing time divided by request count

Licensing and cost

There is no charge for obtaining the extension, only for the data that the extension ingests. The details of license consumption will depend on the licensing model you use. This will either be Dynatrace classic licensing or the Dynatrace Platform Subscription (DPS) model.

License consumption is based on the number of metric data points ingested. The following formula will provide approximate annual data points ingested assuming all feature sets are enabled.

((16 * <number_of_connection_pools) + (5 * <number_of_web_apps>) + (3 * <number_of_thread_pools>)) * 60 minutes * 24 hours * 365 days data points per year

Classic licensing

In the Dynatrace classic licensing model, metric ingestion will consume Davis Data Units (DDUs) at the rate of .001 DDUs per metric data point.

Multiply the above formula for annual data points by .001 to estimate annual DDU usage.

Feature sets

When activating your extension using monitoring configuration, you can limit monitoring to one of the feature sets. To work properly the extension has to collect at least one metric after the activation.

In highly segmented networks, feature sets can reflect the segments of your environment. Then, when you create a monitoring configuration, you can select a feature set and a corresponding ActiveGate group that can connect to this particular segment.

All metrics that aren't categorized into any feature set are considered to be the default and are always reported.

A metric inherits the feature set of a subgroup, which in turn inherits the feature set of a group. Also, the feature set defined on the metric level overrides the feature set defined on the subgroup level, which in turn overrides the feature set defined on the group level.

key-metrics
Metric nameMetric keyDescription
Active connectionstomcat.connectionPool.activeConnectionsCurrently used connections
Created connectionstomcat.connectionPool.createdConnectionsNumber of connections created
Idle connectionstomcat.connectionPool.idleConnectionsNumber of open but unused connections
Waiting connectionstomcat.connectionPool.numWaitersCurrently waiting connections
Abandoned connectionstomcat.connectionPool.removeAbandonedNumber of connections that have not been properly released
Abandoned connection timeouttomcat.connectionPool.removeAbandonedTimeoutTimeout before an abandoned connection can be removed
Waiting connection requeststomcat.connectionPool.waitCountNumber of connection requests currently waiting
thread-pools
Metric nameMetric keyDescription
Current thread counttomcat.threadPool.currentThreadCountCurrent thread count
Current threads busytomcat.threadPool.currentThreadsBusyCurrent threads busy
Max threads allowedtomcat.threadPool.maxThreadsMax threads allowed
stuck-threads
Metric nameMetric keyDescription
Stuck thread counttomcat.stuckThreadsStuck thread count
limits
Metric nameMetric keyDescription
Max total connectionstomcat.connectionPool.maxTotalMaximum total amount of connections
Max active connectionstomcat.connectionPool.maxActiveMaximum amount of active connections allowed concurrently
Max idle connectionstomcat.connectionPool.maxIdleThe maximum number of connections that should be kept in the pool at all times
Max wait timetomcat.connectionPool.maxWaitThe maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception
Minimum idletomcat.connectionPool.minIdleThe minimum number of established connections that should be kept in the pool at all times
web-requests
Metric nameMetric keyDescription
Bytes recievedtomcat.bytesReceived.countBytes recieved
Bytes senttomcat.bytesSent.countBytes sent
Request counttomcat.requestCount.countRequest count
Error counttomcat.errorCount.countError count
Request processing timetomcat.processingTime.countRequest processing time
additional-metrics
Metric nameMetric keyDescription
Borrowed connectionstomcat.connectionPool.borrowedConnections
Reconnected connectionstomcat.connectionPool.reconnectedConnections
Released connectionstomcat.connectionPool.releasedConnections
Returned connectionstomcat.connectionPool.returnedConnections
Related tags
ApplicationJMXConnection poolApacheApplication Observability