# Tomcat enterprise plugin

# Introduction

**Ver**. may 2026

With this plug-in we can see the Tomcast stats.

This document explains how to monitor a Tomcat server through the PandoraFMS plugin.  
The compatibility matrix for the plugin is shown below:

<div id="bkmrk-"></div><div id="bkmrk-systems-where-it-has"><table border="1" style="border-collapse: collapse; width: 100%; height: 144px;"><tbody><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Systems where it has been tested</td></tr><tr style="height: 28px;"><td style="width: 100%; height: 28px;">Tomcat 6</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Tomcat 7</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Tomcat 8</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Tomcat 9</td></tr></tbody></table>

</div><table border="1" id="bkmrk-sistemas-donde-deber" style="border-collapse: collapse; width: 100%; height: 58px;"><tbody><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Systems where it should work</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Tomcat 6.x and above</td></tr></tbody></table>

# Change log

<table border="1" id="bkmrk-fecha-autor-cambio-v" style="border-collapse: collapse; width: 100%; height: 209.417px;"><tbody><tr style="height: 29.9167px;"><td style="width: 25%; height: 29.9167px;">**Date**</td><td style="width: 25%; height: 29.9167px;">**Author**</td><td style="width: 25%; height: 29.9167px;">**Change**</td><td style="width: 25%; height: 29.9167px;">**Version**</td></tr><tr style="height: 29.9167px;"><td style="width: 25%; height: 29.9167px;">09/05/12</td><td style="width: 25%; height: 29.9167px;">Tomas</td><td style="width: 25%; height: 29.9167px;">First Version</td><td style="width: 25%; height: 29.9167px;">v1r1</td></tr><tr style="height: 29.9167px;"><td style="width: 25%; height: 29.9167px;">21/12/12</td><td style="width: 25%; height: 29.9167px;">Tomas</td><td style="width: 25%; height: 29.9167px;">Bug fixed</td><td style="width: 25%; height: 29.9167px;">v1r2</td></tr><tr style="height: 29.9167px;"><td style="width: 25%; height: 29.9167px;">14/01/12</td><td style="width: 25%; height: 29.9167px;">Tomas</td><td style="width: 25%; height: 29.9167px;">Bug fixed</td><td style="width: 25%; height: 29.9167px;">v1r3</td></tr><tr style="height: 29.9167px;"><td style="width: 25%; height: 29.9167px;">12/02/15</td><td style="width: 25%; height: 29.9167px;">MarioP</td><td style="width: 25%; height: 29.9167px;">Bug fixed</td><td style="width: 25%; height: 29.9167px;">v1r5</td></tr><tr style="height: 29.9167px;"><td style="width: 25%; height: 29.9167px;">14/04/16</td><td style="width: 25%; height: 29.9167px;">Borja</td><td style="width: 25%; height: 29.9167px;">New schema</td><td style="width: 25%; height: 29.9167px;">v2r1</td></tr><tr style="height: 29.9167px;"><td style="width: 25%; height: 29.9167px;">11/05/26</td><td style="width: 25%; height: 29.9167px;">AlejandroS</td><td style="width: 25%; height: 29.9167px;">New version</td><td style="width: 25%; height: 29.9167px;">v3r1</td></tr></tbody></table>

# Enviromental configuration

**Parameters**

<table border="1" id="bkmrk---conf-ruta-al-archi"><tbody><tr><td>--conf</td><td>Path to the configuration file</td></tr></tbody></table>

**Conf file (--conf)**

```
[CONF]
host=<host of Tomcat environment>
port=<port of Tomcat environment>
user=<Tomcat username>
password=<Tomcat password>
https=<Enable to use https>
enable_status_monitoring=<Enable to enable status metric monitoring>
enable_vminfo_monitoring=<Enable to enable VM metric monitoring>
module_prefix=<Prefix for modules>
agent_name=<Name for agent>
agents_group_name=<Group name for agent>
interval=<Agent creation interval>
threads=<Number of threads>
temporary=<Path to temporary directories>
transfer_mode=<Transfer mode>
tentacle_ip=<Tentacle path>
tentacle_port=<Tentacle port>
tentacle_opts=<Tentacle options>
data_dir=<Path to .data files >
allow_regexp = <Regexp pattern. Metrics matching the pattern will be monitored>
deny_regexp = <Regexp pattern. Metrics matching the pattern will be discarded>
```

 **Example**

```
[CONF]
host=localhost
port=8080
user=admin
password=admin
https=0
enable_status_monitoring=1
enable_vminfo_monitoring=1
module_prefix = tc01
agent_name = Tomcat server
agents_group_name = tomcat
interval = 300
temporal = /tmp
transfer_mode = tentacle
tentacle_ip = 127.0.0.1
tentacle_port = 41121
tentacle_opts = 
data_dir = /var/spool/pandora/data_in
allow_regexp = .*
deny_regexp = 
```

- **Have the necessary permissions so that from the machine itself you can make a requests to the page**  
    **page in question** (a username and password in tomcat-users.xml enabled to access the content of the page).  
    page).  
    The user must be configured to have the manager-script role, which can also see the list of instances.

```
<user username="user" password="password" roles="manager-script" />
```

This part of the tomcat-users.xml file looks like this:

```
<tomcat-users>
<!-- otros roles -->
<role rolename="manager-script"/>
<!-- otros usuarios -->
<user username="username" password="password" roles="manager-script" />
</tomcat-users>
```

\- Enable access to this page as well as roles to assign to users so that they can obtain its content.  
content.  
\- Know Tomcat version to know the scope of monitoring (compatibility mode, for versions &lt;= 6.  
versions &lt;= 6.X).

# Installation

To retrieve all the data from Tomcat you will need:

The role needed for the plugin to get the information from Tomcat is “manager-script”:

```
<user username="user" password="password" roles="manager-script" />
```

**All the information is retrieved from the Tomcat manager application. Is mandatory to have it**  
**enabled in order to monitor the service.**

```
http://<Tomcat-IP-Address><Puerto>/manager/status?XML=true
http://<Tomcat-IP-Address><Puerto>/manager/text/list
```

Note: Tomcat’s default TCP Port: 8080

  
In case you could find any issue connecting to the service, you can add a new connector to the Tomcatserver. Following you can find a configuration example:

```
/etc/tomcat<version>/server.xml
```

[![image-1643036449902.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-01/scaled-1680-/image-1643036449902.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-01/image-1643036449902.png)

Pandora FMS plugin for Tomcat service monitoring. Example configuration:

```
[CONF]
host=localhost
port=8080
user=admin
password=admin
https=0
enable_status_monitoring=1
enable_vminfo_monitoring=1
module_prefix = tc01
agent_name = Tomcat server
agents_group_name = tomcat
interval = 300
temporal = /tmp
transfer_mode = tentacle
tentacle_ip = 127.0.0.1
tentacle_port = 41121
tentacle_opts = 
data_dir = /var/spool/pandora/data_in
allow_regexp = .*
deny_regexp =
```

As we had configured the file with the values corresponding to our environment, we can deploy the files to the Pandora FMS agent by using file collections. It is a good practice to test the execution before deploy the plugin for first time.

Plugin execution configuration (agent configuration file):

```
module_plugin /path/to/plugin/pandora_tomcat --conf  /path/to/file/pandora_tomcat.conf
```

Binary files are also deployed for Windows Pandora FMS agents (pandora\_tomcat\_x86.exe and  
pandora\_tomcat\_x64.exe)

```
module_plugin <ruta-plugin>/pandora_tomcat_x86.exe --conf <ruta-conf>/pandora_tomcat.conf
```

# Modules generated by the plugin

The modules that return the execution of this plugin are the following (you can add a prefix using the module\_prefix parameter):

```
memory_free
memory_total
memory_max

["http-nio-8080"] maxThreads
["http-nio-8080"] currentThreadsBusy
["http-nio-8080"] currentThreadCount
["http-nio-8080"] Threading usage

["http-nio-8080"] maxTime
["http-nio-8080"] processingTime
["http-nio-8080"] requestCount
["http-nio-8080"] errorCount
["http-nio-8080"] bytesReceived
["http-nio-8080"] bytesSent

[workers] Current requests
[workers] Current BytesReceived
[workers] Current BytesSent

vmname
vmversion
vmvendor
uptime
availableprocessors
systemloadaverage

iscurrentthreadcputimesupported
isthreadcputimesupported
isthreadcputimeenabled
isthreadcontentionmonitoringsupported
isthreadcontentionmonitoringenabled

peak
loaded
unloaded
totalloaded
totalcompilationtime
iscompilationtimemonitoringsupported

getcollectioncount
getcollectiontime

heap_init
heap_used
heap_committed
heap_max

non-heap_init
non-heap_used
non-heap_committed
non-heap_max

[CodeHeap 'non-nmethods'] Pool usage
[CodeHeap 'non-nmethods'] Pool commited
[CodeHeap 'profiled nmethods'] Pool usage
[CodeHeap 'profiled nmethods'] Pool commited
[CodeHeap 'non-profiled nmethods'] Pool usage
[CodeHeap 'non-profiled nmethods'] Pool commited
[Compressed Class Space] Pool usage
[Compressed Class Space] Pool commited
[G1 Old Gen] Pool usage
[G1 Old Gen] Pool commited

[Memory] Heap usage
[Memory] Heap committed
[Memory] Non-Heap used
[Memory] Non-Heap committed
[Memory] Non-Heap max
```