Apache Tomcat Monitoring

Tomcat server monitoring and performance management made easy with Site24x7 plugins.

Efficient monitoring of your Apache Tomcat servers is essential as poor performance can have a direct influence on the end-user experience. With Site24x7 Tomcat plugin, get a detailed view of all the critical Tomcat service metrics in a single, intuitive dashboard.

This document details how to configure the Apache Tomcat plugin and the monitoring metrics for providing in-depth visibility into the performance, availability, and usage stats of Tomcat servers.

Apache Tomcat server monitoring metrics:

Monitor your Tomcat server with Site24x7 plugins and get insightful visualizations and timely alerts. Metrics for monitoring Tomcat server falls into three categories: thread pool metrics, overall memory metrics and usage metrics for each memory pool.

Various out-of-the-box metrics we support are:

Total number of threads

The thread_count metric is critical for tracking the resource consumption. This helps to prevent bottlenecks and detect thread pool exhaustion.

Busy threads count and total number of threads allowed

Comparing the thread_busy and thread_count with the thread_allowed, the user can infer on the resource consumption.

Bytes received and bytes sent

Relate the thread count metrics with the bytes_received and bytes_sent to get visibility on the capacity of your web server

Total number of errors

The error_count gives the number of errors per second on all request processors

Number of requests

The request_count metric gives the number of requests per second across all request processors

Free Memory

The free_memory shows the amount of heap space currently available to the Java Virtual Machine (JVM)

Maximum Memory

The max_memory is the maximum size of the heap space not including the permanent generation area

Time taken for processing the request

The sum of request processing times across all requests handled by the request processors is shown under processing_time

Total Memory

The total_memory is the memory currently allocated to the JVM heap space

Usage stats of each memory pool

Data from the metric usage_"name of the memory pool" gives the user a quick look on the memory usage. This can help manage memory resources proactively and resolve downtimes in production.

How it works?

  • Log-in to your Site24x7 account. Sign up here if you don't have one
  • Download and install the latest version of Site24x7 Linux agent
  • Install the Apache Tomcat plugin
  • The agent will execute the Tomcat plugin and push the data to the Site24x7 server


  • Ensure the configured TOMCAT_USERNAME is rightly assigned to the manager-script role in the tomcat-users.xml file.

Tomcat plugin installation:

  • Create a directory with the name "tomcat_connector" or "tomcat_overallmemory" or "tomcat_memorypool", under Site24x7 Linux agent plugin directory - /opt/site24x7/monagent/plugins/
    sudo mkdir tomcat_connector
    sudo mkdir tomcat_overallmemory
    sudo mkdir tomcat_memorypool
  • Download the "tomcat_connector.py", "tomcat_overallmemory.py" or the "tomcat_memorypool.py" from our GitHub repository and place it under the "tomcat_connector", "tomcat_overallmemory" or "tomcat_memorypool" directory respectively
  • The default python path given in the plugin script is #!/usr/bin/python. If you wish to provide an alternate python path, replace the existing one preceded by the shebang character "#!".
  • The server agent will report stats on the performance of Tomcat server under the Plugins tab in the Site24x7 web client. In case the plugin is not listed in the Site24x7 web client, restart the agent.
    sudo /etc/init.d/site24x7monagent restart

Monitoring additional metrics:

  • To monitor additional metrics, edit the "tomcat_connector.py", "tomcat_overallmemory.py" or "tomcat_memorypool.py" file and add the new metrics that need monitoring
  • Increment the plugin version value in the file to view the newly added metrics (For e.g., change the default plugin version from PLUGIN_VERSION = "1" to "PLUGIN_VERSION = "2")

Related plugins:

  • ActiveMQ plugin - Monitor performance metrics of your Apache ActiveMQ instances
  • Kafka plugin - Monitor performance metrics of your Kafka servers
  • Memcached plugin - Analyze performance of your Memcached server
  • Nagios plugin - Execute thousands of Nagios plugins in Site24x7 without the need of running a Nagios server
  • Out-of-the-box plugins - Monitor your entire app stack with our extensive list of integrations
  • Create custom plugins - Create custom Linux and Windows plugins and monitor custom attributes

World's leading companies


Don't have a Site24x7 account? Sign up now!