Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/tomcat_jmx?at=release/7.4
Apache Tomcat by JMX
Overview
This template is designed for the effortless deployment of Apache Tomcat monitoring by Zabbix via JMX and doesn't require any external scripts.
Requirements
Zabbix version: 7.4 and higher.
Tested versions
This template has been tested on:
- Apache Tomcat 8.5.59
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
Metrics are collected by JMX.
- Enable and configure JMX access to Apache Tomcat. See documentation for instructions (chose your version).
- If your Tomcat installation require authentication for JMX, set values in host macros {$TOMCAT.USERNAME} and {$TOMCAT.PASSWORD}.
- You can set custom macro values and add macros with context for specific metrics following macro description.
Macros used
Name | Description | Default |
---|---|---|
{$TOMCAT.USER} | User for JMX |
|
{$TOMCAT.PASSWORD} | Password for JMX |
|
{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.MATCHES} | Filter for discoverable global request processors. |
.* |
{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.NOT_MATCHES} | Filter to exclude global request processors. |
CHANGE_IF_NEEDED |
{$TOMCAT.LLD.FILTER.MANAGER.MATCHES} | Filter for discoverable managers. |
.* |
{$TOMCAT.LLD.FILTER.MANAGER.NOT_MATCHES} | Filter to exclude managers. |
CHANGE_IF_NEEDED |
{$TOMCAT.LLD.FILTER.THREAD_POOL.MATCHES} | Filter for discoverable thread pools. |
.* |
{$TOMCAT.LLD.FILTER.THREAD_POOL.NOT_MATCHES} | Filter to exclude thread pools. |
CHANGE_IF_NEEDED |
{$TOMCAT.THREADS.MAX.PCT} | Threshold for busy worker threads trigger. Can be used with {#JMXNAME} as context. |
75 |
{$TOMCAT.THREADS.MAX.TIME} | The time during which the number of busy threads can exceed the threshold. Can be used with {#JMXNAME} as context. |
5m |
Items
Name | Description | Type | Key and additional info |
---|---|---|---|
Version | The version of the Tomcat. |
JMX agent | jmx["Catalina:type=Server",serverInfo] Preprocessing
|
Triggers
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Apache Tomcat: Version has been changed | The Tomcat version has changed. Acknowledge to close the problem manually. |
last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#1)<>last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#2) and length(last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo]))>0 |
Info | Manual close: Yes |
LLD rule Global request processors discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Global request processors discovery | Discovery for GlobalRequestProcessor |
JMX agent | jmx.discovery[beans,"Catalina:type=GlobalRequestProcessor,name=*"] |
Item prototypes for Global request processors discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXNAME}: Bytes received per second | Bytes received rate by processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},bytesReceived] Preprocessing
|
{#JMXNAME}: Bytes sent per second | Bytes sent rate by processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},bytesSent] Preprocessing
|
{#JMXNAME}: Errors per second | Error rate of request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},errorCount] Preprocessing
|
{#JMXNAME}: Requests per second | Rate of requests served by request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},requestCount] Preprocessing
|
{#JMXNAME}: Requests processing time | The total time to process all incoming requests of request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},processingTime] Preprocessing
|
LLD rule Protocol handlers discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Protocol handlers discovery | Discovery for ProtocolHandler |
JMX agent | jmx.discovery[attributes,"Catalina:type=ProtocolHandler,port=*"] |
Item prototypes for Protocol handlers discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXVALUE}: Gzip compression status | Gzip compression status on {#JMXNAME}. Enabling gzip compression may save server bandwidth. |
JMX agent | jmx[{#JMXOBJ},compression] Preprocessing
|
Trigger prototypes for Protocol handlers discovery
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Apache Tomcat: {#JMXVALUE}: Gzip compression is disabled | gzip compression is disabled for connector {#JMXVALUE}. |
find(/Apache Tomcat by JMX/jmx[{#JMXOBJ},compression],,"like","off") = 1 |
Info | Manual close: Yes |
LLD rule Thread pools discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Thread pools discovery | Discovery for ThreadPool |
JMX agent | jmx.discovery[beans,"Catalina:type=ThreadPool,name=*"] |
Item prototypes for Thread pools discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXNAME}: Threads count | Amount of threads the thread pool has right now, both busy and free. |
JMX agent | jmx[{#JMXOBJ},currentThreadCount] Preprocessing
|
{#JMXNAME}: Threads limit | Limit of the threads count. When currentThreadsBusy counter reaches the maxThreads limit, no more requests could be handled, and the application chokes. |
JMX agent | jmx[{#JMXOBJ},maxThreads] Preprocessing
|
{#JMXNAME}: Threads busy | Number of the requests that are being currently handled. |
JMX agent | jmx[{#JMXOBJ},currentThreadsBusy] |
Trigger prototypes for Thread pools discovery
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Apache Tomcat: {#JMXNAME}: Busy worker threads count is high | When current threads busy counter reaches the limit, no more requests could be handled, and the application chokes. |
min(/Apache Tomcat by JMX/jmx[{#JMXOBJ},currentThreadsBusy],{$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"})>last(/Apache Tomcat by JMX/jmx[{#JMXOBJ},maxThreads])*{$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}/100 |
High |
LLD rule Contexts discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Contexts discovery | Discovery for contexts |
JMX agent | jmx.discovery[beans,"Catalina:type=Manager,host=,context="] |
Item prototypes for Contexts discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXHOST}{#JMXCONTEXT}: Sessions active | Active sessions of the application. |
JMX agent | jmx[{#JMXOBJ},activeSessions] |
{#JMXHOST}{#JMXCONTEXT}: Sessions active maximum so far | Maximum number of active sessions so far. |
JMX agent | jmx[{#JMXOBJ},maxActive] |
{#JMXHOST}{#JMXCONTEXT}: Sessions created per second | Rate of sessions created by this application per second. |
JMX agent | jmx[{#JMXOBJ},sessionCounter] Preprocessing
|
{#JMXHOST}{#JMXCONTEXT}: Sessions rejected per second | Rate of sessions we rejected due to maxActive being reached. |
JMX agent | jmx[{#JMXOBJ},rejectedSessions] Preprocessing
|
{#JMXHOST}{#JMXCONTEXT}: Sessions allowed maximum | The maximum number of active Sessions allowed, or -1 for no limit. |
JMX agent | jmx[{#JMXOBJ},maxActiveSessions] |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/tomcat_jmx?at=release/7.2
Apache Tomcat by JMX
Overview
This template is designed for the effortless deployment of Apache Tomcat monitoring by Zabbix via JMX and doesn't require any external scripts.
Requirements
Zabbix version: 7.2 and higher.
Tested versions
This template has been tested on:
- Apache Tomcat 8.5.59
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
Metrics are collected by JMX.
- Enable and configure JMX access to Apache Tomcat. See documentation for instructions (chose your version).
- If your Tomcat installation require authentication for JMX, set values in host macros {$TOMCAT.USERNAME} and {$TOMCAT.PASSWORD}.
- You can set custom macro values and add macros with context for specific metrics following macro description.
Macros used
Name | Description | Default |
---|---|---|
{$TOMCAT.USER} | User for JMX |
|
{$TOMCAT.PASSWORD} | Password for JMX |
|
{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.MATCHES} | Filter for discoverable global request processors. |
.* |
{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.NOT_MATCHES} | Filter to exclude global request processors. |
CHANGE_IF_NEEDED |
{$TOMCAT.LLD.FILTER.MANAGER.MATCHES} | Filter for discoverable managers. |
.* |
{$TOMCAT.LLD.FILTER.MANAGER.NOT_MATCHES} | Filter to exclude managers. |
CHANGE_IF_NEEDED |
{$TOMCAT.LLD.FILTER.THREAD_POOL.MATCHES} | Filter for discoverable thread pools. |
.* |
{$TOMCAT.LLD.FILTER.THREAD_POOL.NOT_MATCHES} | Filter to exclude thread pools. |
CHANGE_IF_NEEDED |
{$TOMCAT.THREADS.MAX.PCT} | Threshold for busy worker threads trigger. Can be used with {#JMXNAME} as context. |
75 |
{$TOMCAT.THREADS.MAX.TIME} | The time during which the number of busy threads can exceed the threshold. Can be used with {#JMXNAME} as context. |
5m |
Items
Name | Description | Type | Key and additional info |
---|---|---|---|
Version | The version of the Tomcat. |
JMX agent | jmx["Catalina:type=Server",serverInfo] Preprocessing
|
Triggers
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Apache Tomcat: Version has been changed | The Tomcat version has changed. Acknowledge to close the problem manually. |
last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#1)<>last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#2) and length(last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo]))>0 |
Info | Manual close: Yes |
LLD rule Global request processors discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Global request processors discovery | Discovery for GlobalRequestProcessor |
JMX agent | jmx.discovery[beans,"Catalina:type=GlobalRequestProcessor,name=*"] |
Item prototypes for Global request processors discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXNAME}: Bytes received per second | Bytes received rate by processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},bytesReceived] Preprocessing
|
{#JMXNAME}: Bytes sent per second | Bytes sent rate by processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},bytesSent] Preprocessing
|
{#JMXNAME}: Errors per second | Error rate of request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},errorCount] Preprocessing
|
{#JMXNAME}: Requests per second | Rate of requests served by request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},requestCount] Preprocessing
|
{#JMXNAME}: Requests processing time | The total time to process all incoming requests of request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},processingTime] Preprocessing
|
LLD rule Protocol handlers discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Protocol handlers discovery | Discovery for ProtocolHandler |
JMX agent | jmx.discovery[attributes,"Catalina:type=ProtocolHandler,port=*"] |
Item prototypes for Protocol handlers discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXVALUE}: Gzip compression status | Gzip compression status on {#JMXNAME}. Enabling gzip compression may save server bandwidth. |
JMX agent | jmx[{#JMXOBJ},compression] Preprocessing
|
Trigger prototypes for Protocol handlers discovery
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Apache Tomcat: {#JMXVALUE}: Gzip compression is disabled | gzip compression is disabled for connector {#JMXVALUE}. |
find(/Apache Tomcat by JMX/jmx[{#JMXOBJ},compression],,"like","off") = 1 |
Info | Manual close: Yes |
LLD rule Thread pools discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Thread pools discovery | Discovery for ThreadPool |
JMX agent | jmx.discovery[beans,"Catalina:type=ThreadPool,name=*"] |
Item prototypes for Thread pools discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXNAME}: Threads count | Amount of threads the thread pool has right now, both busy and free. |
JMX agent | jmx[{#JMXOBJ},currentThreadCount] Preprocessing
|
{#JMXNAME}: Threads limit | Limit of the threads count. When currentThreadsBusy counter reaches the maxThreads limit, no more requests could be handled, and the application chokes. |
JMX agent | jmx[{#JMXOBJ},maxThreads] Preprocessing
|
{#JMXNAME}: Threads busy | Number of the requests that are being currently handled. |
JMX agent | jmx[{#JMXOBJ},currentThreadsBusy] |
Trigger prototypes for Thread pools discovery
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Apache Tomcat: {#JMXNAME}: Busy worker threads count is high | When current threads busy counter reaches the limit, no more requests could be handled, and the application chokes. |
min(/Apache Tomcat by JMX/jmx[{#JMXOBJ},currentThreadsBusy],{$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"})>last(/Apache Tomcat by JMX/jmx[{#JMXOBJ},maxThreads])*{$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}/100 |
High |
LLD rule Contexts discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Contexts discovery | Discovery for contexts |
JMX agent | jmx.discovery[beans,"Catalina:type=Manager,host=,context="] |
Item prototypes for Contexts discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXHOST}{#JMXCONTEXT}: Sessions active | Active sessions of the application. |
JMX agent | jmx[{#JMXOBJ},activeSessions] |
{#JMXHOST}{#JMXCONTEXT}: Sessions active maximum so far | Maximum number of active sessions so far. |
JMX agent | jmx[{#JMXOBJ},maxActive] |
{#JMXHOST}{#JMXCONTEXT}: Sessions created per second | Rate of sessions created by this application per second. |
JMX agent | jmx[{#JMXOBJ},sessionCounter] Preprocessing
|
{#JMXHOST}{#JMXCONTEXT}: Sessions rejected per second | Rate of sessions we rejected due to maxActive being reached. |
JMX agent | jmx[{#JMXOBJ},rejectedSessions] Preprocessing
|
{#JMXHOST}{#JMXCONTEXT}: Sessions allowed maximum | The maximum number of active Sessions allowed, or -1 for no limit. |
JMX agent | jmx[{#JMXOBJ},maxActiveSessions] |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/tomcat_jmx?at=release/7.0
Apache Tomcat by JMX
Overview
This template is designed for the effortless deployment of Apache Tomcat monitoring by Zabbix via JMX and doesn't require any external scripts.
Requirements
Zabbix version: 7.0 and higher.
Tested versions
This template has been tested on:
- Apache Tomcat 8.5.59
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
Metrics are collected by JMX.
- Enable and configure JMX access to Apache Tomcat. See documentation for instructions (chose your version).
- If your Tomcat installation require authentication for JMX, set values in host macros {$TOMCAT.USERNAME} and {$TOMCAT.PASSWORD}.
- You can set custom macro values and add macros with context for specific metrics following macro description.
Macros used
Name | Description | Default |
---|---|---|
{$TOMCAT.USER} | User for JMX |
|
{$TOMCAT.PASSWORD} | Password for JMX |
|
{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.MATCHES} | Filter for discoverable global request processors. |
.* |
{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.NOT_MATCHES} | Filter to exclude global request processors. |
CHANGE_IF_NEEDED |
{$TOMCAT.LLD.FILTER.MANAGER.MATCHES} | Filter for discoverable managers. |
.* |
{$TOMCAT.LLD.FILTER.MANAGER.NOT_MATCHES} | Filter to exclude managers. |
CHANGE_IF_NEEDED |
{$TOMCAT.LLD.FILTER.THREAD_POOL.MATCHES} | Filter for discoverable thread pools. |
.* |
{$TOMCAT.LLD.FILTER.THREAD_POOL.NOT_MATCHES} | Filter to exclude thread pools. |
CHANGE_IF_NEEDED |
{$TOMCAT.THREADS.MAX.PCT} | Threshold for busy worker threads trigger. Can be used with {#JMXNAME} as context. |
75 |
{$TOMCAT.THREADS.MAX.TIME} | The time during which the number of busy threads can exceed the threshold. Can be used with {#JMXNAME} as context. |
5m |
Items
Name | Description | Type | Key and additional info |
---|---|---|---|
Version | The version of the Tomcat. |
JMX agent | jmx["Catalina:type=Server",serverInfo] Preprocessing
|
Triggers
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Apache Tomcat: Version has been changed | The Tomcat version has changed. Acknowledge to close the problem manually. |
last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#1)<>last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#2) and length(last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo]))>0 |
Info | Manual close: Yes |
LLD rule Global request processors discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Global request processors discovery | Discovery for GlobalRequestProcessor |
JMX agent | jmx.discovery[beans,"Catalina:type=GlobalRequestProcessor,name=*"] |
Item prototypes for Global request processors discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXNAME}: Bytes received per second | Bytes received rate by processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},bytesReceived] Preprocessing
|
{#JMXNAME}: Bytes sent per second | Bytes sent rate by processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},bytesSent] Preprocessing
|
{#JMXNAME}: Errors per second | Error rate of request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},errorCount] Preprocessing
|
{#JMXNAME}: Requests per second | Rate of requests served by request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},requestCount] Preprocessing
|
{#JMXNAME}: Requests processing time | The total time to process all incoming requests of request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},processingTime] Preprocessing
|
LLD rule Protocol handlers discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Protocol handlers discovery | Discovery for ProtocolHandler |
JMX agent | jmx.discovery[attributes,"Catalina:type=ProtocolHandler,port=*"] |
Item prototypes for Protocol handlers discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXVALUE}: Gzip compression status | Gzip compression status on {#JMXNAME}. Enabling gzip compression may save server bandwidth. |
JMX agent | jmx[{#JMXOBJ},compression] Preprocessing
|
Trigger prototypes for Protocol handlers discovery
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Apache Tomcat: {#JMXVALUE}: Gzip compression is disabled | gzip compression is disabled for connector {#JMXVALUE}. |
find(/Apache Tomcat by JMX/jmx[{#JMXOBJ},compression],,"like","off") = 1 |
Info | Manual close: Yes |
LLD rule Thread pools discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Thread pools discovery | Discovery for ThreadPool |
JMX agent | jmx.discovery[beans,"Catalina:type=ThreadPool,name=*"] |
Item prototypes for Thread pools discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXNAME}: Threads count | Amount of threads the thread pool has right now, both busy and free. |
JMX agent | jmx[{#JMXOBJ},currentThreadCount] Preprocessing
|
{#JMXNAME}: Threads limit | Limit of the threads count. When currentThreadsBusy counter reaches the maxThreads limit, no more requests could be handled, and the application chokes. |
JMX agent | jmx[{#JMXOBJ},maxThreads] Preprocessing
|
{#JMXNAME}: Threads busy | Number of the requests that are being currently handled. |
JMX agent | jmx[{#JMXOBJ},currentThreadsBusy] |
Trigger prototypes for Thread pools discovery
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Apache Tomcat: {#JMXNAME}: Busy worker threads count is high | When current threads busy counter reaches the limit, no more requests could be handled, and the application chokes. |
min(/Apache Tomcat by JMX/jmx[{#JMXOBJ},currentThreadsBusy],{$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"})>last(/Apache Tomcat by JMX/jmx[{#JMXOBJ},maxThreads])*{$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}/100 |
High |
LLD rule Contexts discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Contexts discovery | Discovery for contexts |
JMX agent | jmx.discovery[beans,"Catalina:type=Manager,host=,context="] |
Item prototypes for Contexts discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXHOST}{#JMXCONTEXT}: Sessions active | Active sessions of the application. |
JMX agent | jmx[{#JMXOBJ},activeSessions] |
{#JMXHOST}{#JMXCONTEXT}: Sessions active maximum so far | Maximum number of active sessions so far. |
JMX agent | jmx[{#JMXOBJ},maxActive] |
{#JMXHOST}{#JMXCONTEXT}: Sessions created per second | Rate of sessions created by this application per second. |
JMX agent | jmx[{#JMXOBJ},sessionCounter] Preprocessing
|
{#JMXHOST}{#JMXCONTEXT}: Sessions rejected per second | Rate of sessions we rejected due to maxActive being reached. |
JMX agent | jmx[{#JMXOBJ},rejectedSessions] Preprocessing
|
{#JMXHOST}{#JMXCONTEXT}: Sessions allowed maximum | The maximum number of active Sessions allowed, or -1 for no limit. |
JMX agent | jmx[{#JMXOBJ},maxActiveSessions] |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/tomcat_jmx?at=release/6.4
Apache Tomcat by JMX
Overview
This template is designed for the effortless deployment of Apache Tomcat monitoring by Zabbix via JMX and doesn't require any external scripts.
Requirements
Zabbix version: 6.4 and higher.
Tested versions
This template has been tested on:
- Apache Tomcat 8.5.59
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
Metrics are collected by JMX.
- Enable and configure JMX access to Apache Tomcat. See documentation for instructions (chose your version).
- If your Tomcat installation require authentication for JMX, set values in host macros {$TOMCAT.USERNAME} and {$TOMCAT.PASSWORD}.
- You can set custom macro values and add macros with context for specific metrics following macro description.
Macros used
Name | Description | Default |
---|---|---|
{$TOMCAT.USER} | User for JMX |
|
{$TOMCAT.PASSWORD} | Password for JMX |
|
{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.MATCHES} | Filter for discoverable global request processors. |
.* |
{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.NOT_MATCHES} | Filter to exclude global request processors. |
CHANGE_IF_NEEDED |
{$TOMCAT.LLD.FILTER.MANAGER.MATCHES} | Filter for discoverable managers. |
.* |
{$TOMCAT.LLD.FILTER.MANAGER.NOT_MATCHES} | Filter to exclude managers. |
CHANGE_IF_NEEDED |
{$TOMCAT.LLD.FILTER.THREAD_POOL.MATCHES} | Filter for discoverable thread pools. |
.* |
{$TOMCAT.LLD.FILTER.THREAD_POOL.NOT_MATCHES} | Filter to exclude thread pools. |
CHANGE_IF_NEEDED |
{$TOMCAT.THREADS.MAX.PCT} | Threshold for busy worker threads trigger. Can be used with {#JMXNAME} as context. |
75 |
{$TOMCAT.THREADS.MAX.TIME} | The time during which the number of busy threads can exceed the threshold. Can be used with {#JMXNAME} as context. |
5m |
Items
Name | Description | Type | Key and additional info |
---|---|---|---|
Tomcat: Version | The version of the Tomcat. |
JMX agent | jmx["Catalina:type=Server",serverInfo] Preprocessing
|
Triggers
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Tomcat: Version has been changed | The Tomcat version has changed. Acknowledge to close the problem manually. |
last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#1)<>last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#2) and length(last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo]))>0 |
Info | Manual close: Yes |
LLD rule Global request processors discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Global request processors discovery | Discovery for GlobalRequestProcessor |
JMX agent | jmx.discovery[beans,"Catalina:type=GlobalRequestProcessor,name=*"] |
Item prototypes for Global request processors discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXNAME}: Bytes received per second | Bytes received rate by processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},bytesReceived] Preprocessing
|
{#JMXNAME}: Bytes sent per second | Bytes sent rate by processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},bytesSent] Preprocessing
|
{#JMXNAME}: Errors per second | Error rate of request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},errorCount] Preprocessing
|
{#JMXNAME}: Requests per second | Rate of requests served by request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},requestCount] Preprocessing
|
{#JMXNAME}: Requests processing time | The total time to process all incoming requests of request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},processingTime] Preprocessing
|
LLD rule Protocol handlers discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Protocol handlers discovery | Discovery for ProtocolHandler |
JMX agent | jmx.discovery[attributes,"Catalina:type=ProtocolHandler,port=*"] |
Item prototypes for Protocol handlers discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXVALUE}: Gzip compression status | Gzip compression status on {#JMXNAME}. Enabling gzip compression may save server bandwidth. |
JMX agent | jmx[{#JMXOBJ},compression] Preprocessing
|
Trigger prototypes for Protocol handlers discovery
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
{#JMXVALUE}: Gzip compression is disabled | gzip compression is disabled for connector {#JMXVALUE}. |
find(/Apache Tomcat by JMX/jmx[{#JMXOBJ},compression],,"like","off") = 1 |
Info | Manual close: Yes |
LLD rule Thread pools discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Thread pools discovery | Discovery for ThreadPool |
JMX agent | jmx.discovery[beans,"Catalina:type=ThreadPool,name=*"] |
Item prototypes for Thread pools discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXNAME}: Threads count | Amount of threads the thread pool has right now, both busy and free. |
JMX agent | jmx[{#JMXOBJ},currentThreadCount] Preprocessing
|
{#JMXNAME}: Threads limit | Limit of the threads count. When currentThreadsBusy counter reaches the maxThreads limit, no more requests could be handled, and the application chokes. |
JMX agent | jmx[{#JMXOBJ},maxThreads] Preprocessing
|
{#JMXNAME}: Threads busy | Number of the requests that are being currently handled. |
JMX agent | jmx[{#JMXOBJ},currentThreadsBusy] |
Trigger prototypes for Thread pools discovery
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
{#JMXNAME}: Busy worker threads count is high | When current threads busy counter reaches the limit, no more requests could be handled, and the application chokes. |
min(/Apache Tomcat by JMX/jmx[{#JMXOBJ},currentThreadsBusy],{$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"})>last(/Apache Tomcat by JMX/jmx[{#JMXOBJ},maxThreads])*{$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}/100 |
High |
LLD rule Contexts discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Contexts discovery | Discovery for contexts |
JMX agent | jmx.discovery[beans,"Catalina:type=Manager,host=,context="] |
Item prototypes for Contexts discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXHOST}{#JMXCONTEXT}: Sessions active | Active sessions of the application. |
JMX agent | jmx[{#JMXOBJ},activeSessions] |
{#JMXHOST}{#JMXCONTEXT}: Sessions active maximum so far | Maximum number of active sessions so far. |
JMX agent | jmx[{#JMXOBJ},maxActive] |
{#JMXHOST}{#JMXCONTEXT}: Sessions created per second | Rate of sessions created by this application per second. |
JMX agent | jmx[{#JMXOBJ},sessionCounter] Preprocessing
|
{#JMXHOST}{#JMXCONTEXT}: Sessions rejected per second | Rate of sessions we rejected due to maxActive being reached. |
JMX agent | jmx[{#JMXOBJ},rejectedSessions] Preprocessing
|
{#JMXHOST}{#JMXCONTEXT}: Sessions allowed maximum | The maximum number of active Sessions allowed, or -1 for no limit. |
JMX agent | jmx[{#JMXOBJ},maxActiveSessions] |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/tomcat_jmx?at=release/6.2
Apache Tomcat by JMX
Overview
For Zabbix version: 6.2 and higher
Official JMX Template for Apache Tomcat.
This template was tested on:
- Apache Tomcat, version 8.5.59
Setup
See Zabbix template operation for basic instructions.
Metrics are collected by JMX.
- Enable and configure JMX access to Apache Tomcat. See documentation for instructions (chose your version).
- If your Tomcat installation require authentication for JMX, set values in host macros {$TOMCAT.USERNAME} and {$TOMCAT.PASSWORD}.
- You can set custom macro values and add macros with context for specific metrics following macro description.
Zabbix configuration
No specific Zabbix configuration is required.
Macros used
Name | Description | Default |
---|---|---|
{$TOMCAT.LLD.FILTER.MATCHES} | Filter for discoverable objects. Can be used with following contexts: "GlobalRequestProcessor", "ThreadPool", "Manager" |
.* |
{$TOMCAT.LLD.FILTER.NOT_MATCHES} | Filter to exclude discovered objects. Can be used with following contexts: "GlobalRequestProcessor", "ThreadPool", "Manager" |
CHANGE IF NEEDED |
{$TOMCAT.PASSWORD} | Password for JMX |
`` |
{$TOMCAT.THREADS.MAX.PCT} | Threshold for busy worker threads trigger. Can be used with {#JMXNAME} as context. |
75 |
{$TOMCAT.THREADS.MAX.TIME} | The time during which the number of busy threads can exceed the threshold. Can be used with {#JMXNAME} as context. |
5m |
{$TOMCAT.USER} | User for JMX |
`` |
Template links
There are no template links in this template.
Discovery rules
Name | Description | Type | Key and additional info |
---|---|---|---|
Contexts discovery | Discovery for contexts |
JMX | jmx.discovery[beans,"Catalina:type=Manager,host=,context="] Filter: AND- {#JMXHOST} MATCHES_REGEX - {#JMXHOST} NOT_MATCHES_REGEX |
Global request processors discovery | Discovery for GlobalRequestProcessor |
JMX | jmx.discovery[beans,"Catalina:type=GlobalRequestProcessor,name=*"] Filter: AND- {#JMXNAME} MATCHES_REGEX - {#JMXNAME} NOT_MATCHES_REGEX |
Protocol handlers discovery | Discovery for ProtocolHandler |
JMX | jmx.discovery[attributes,"Catalina:type=ProtocolHandler,port=*"] Filter: AND- {#JMXATTR} MATCHES_REGEX |
Thread pools discovery | Discovery for ThreadPool |
JMX | jmx.discovery[beans,"Catalina:type=ThreadPool,name=*"] Filter: AND- {#JMXNAME} MATCHES_REGEX - {#JMXNAME} NOT_MATCHES_REGEX |
Items collected
Group | Name | Description | Type | Key and additional info |
---|---|---|---|---|
Tomcat | Tomcat: Version | The version of the Tomcat. |
JMX | jmx["Catalina:type=Server",serverInfo] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
Tomcat | {#JMXNAME}: Bytes received per second | Bytes received rate by processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},bytesReceived] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXNAME}: Bytes sent per second | Bytes sent rate by processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},bytesSent] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXNAME}: Errors per second | Error rate of request processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},errorCount] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXNAME}: Requests per second | Rate of requests served by request processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},requestCount] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXNAME}: Requests processing time | The total time to process all incoming requests of request processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},processingTime] Preprocessing: - MULTIPLIER: |
Tomcat | {#JMXVALUE}: Gzip compression status | Gzip compression status on {#JMXNAME}. Enabling gzip compression may save server bandwidth. |
JMX | jmx[{#JMXOBJ},compression] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
Tomcat | {#JMXNAME}: Threads count | Amount of threads the thread pool has right now, both busy and free. |
JMX | jmx[{#JMXOBJ},currentThreadCount] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
Tomcat | {#JMXNAME}: Threads limit | Limit of the threads count. When currentThreadsBusy counter reaches the maxThreads limit, no more requests could be handled, and the application chokes. |
JMX | jmx[{#JMXOBJ},maxThreads] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
Tomcat | {#JMXNAME}: Threads busy | Number of the requests that are being currently handled. |
JMX | jmx[{#JMXOBJ},currentThreadsBusy] |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions active | Active sessions of the application. |
JMX | jmx[{#JMXOBJ},activeSessions] |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions active maximum so far | Maximum number of active sessions so far. |
JMX | jmx[{#JMXOBJ},maxActive] |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions created per second | Rate of sessions created by this application per second. |
JMX | jmx[{#JMXOBJ},sessionCounter] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions rejected per second | Rate of sessions we rejected due to maxActive being reached. |
JMX | jmx[{#JMXOBJ},rejectedSessions] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions allowed maximum | The maximum number of active Sessions allowed, or -1 for no limit. |
JMX | jmx[{#JMXOBJ},maxActiveSessions] |
Triggers
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Tomcat: Version has been changed | Tomcat version has changed. Ack to close. |
last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#1)<>last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#2) and length(last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo]))>0 |
INFO | Manual close: YES |
{#JMXVALUE}: Gzip compression is disabled | gzip compression is disabled for connector {#JMXVALUE}. |
find(/Apache Tomcat by JMX/jmx[{#JMXOBJ},compression],,"like","off") = 1 |
INFO | Manual close: YES |
{#JMXNAME}: Busy worker threads count is high | When current threads busy counter reaches the limit, no more requests could be handled, and the application chokes. |
min(/Apache Tomcat by JMX/jmx[{#JMXOBJ},currentThreadsBusy],{$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"})>last(/Apache Tomcat by JMX/jmx[{#JMXOBJ},maxThreads])*{$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}/100 |
HIGH |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template or ask for help with it at ZABBIX forums.
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/tomcat_jmx?at=release/6.0
Apache Tomcat by JMX
Overview
This template is designed for the effortless deployment of Apache Tomcat monitoring by Zabbix via JMX and doesn't require any external scripts.
Requirements
Zabbix version: 6.0 and higher.
Tested versions
This template has been tested on:
- Apache Tomcat 8.5.59
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
Metrics are collected by JMX.
- Enable and configure JMX access to Apache Tomcat. See documentation for instructions (chose your version).
- If your Tomcat installation require authentication for JMX, set values in host macros {$TOMCAT.USERNAME} and {$TOMCAT.PASSWORD}.
- You can set custom macro values and add macros with context for specific metrics following macro description.
Macros used
Name | Description | Default |
---|---|---|
{$TOMCAT.USER} | User for JMX |
|
{$TOMCAT.PASSWORD} | Password for JMX |
|
{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.MATCHES} | Filter for discoverable global request processors. |
.* |
{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.NOT_MATCHES} | Filter to exclude global request processors. |
CHANGE_IF_NEEDED |
{$TOMCAT.LLD.FILTER.MANAGER.MATCHES} | Filter for discoverable managers. |
.* |
{$TOMCAT.LLD.FILTER.MANAGER.NOT_MATCHES} | Filter to exclude managers. |
CHANGE_IF_NEEDED |
{$TOMCAT.LLD.FILTER.THREAD_POOL.MATCHES} | Filter for discoverable thread pools. |
.* |
{$TOMCAT.LLD.FILTER.THREAD_POOL.NOT_MATCHES} | Filter to exclude thread pools. |
CHANGE_IF_NEEDED |
{$TOMCAT.THREADS.MAX.PCT} | Threshold for busy worker threads trigger. Can be used with {#JMXNAME} as context. |
75 |
{$TOMCAT.THREADS.MAX.TIME} | The time during which the number of busy threads can exceed the threshold. Can be used with {#JMXNAME} as context. |
5m |
Items
Name | Description | Type | Key and additional info |
---|---|---|---|
Tomcat: Version | The version of the Tomcat. |
JMX agent | jmx["Catalina:type=Server",serverInfo] Preprocessing
|
Triggers
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Tomcat: Version has been changed | The Tomcat version has changed. Acknowledge to close the problem manually. |
last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#1)<>last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#2) and length(last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo]))>0 |
Info | Manual close: Yes |
LLD rule Global request processors discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Global request processors discovery | Discovery for GlobalRequestProcessor |
JMX agent | jmx.discovery[beans,"Catalina:type=GlobalRequestProcessor,name=*"] |
Item prototypes for Global request processors discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXNAME}: Bytes received per second | Bytes received rate by processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},bytesReceived] Preprocessing
|
{#JMXNAME}: Bytes sent per second | Bytes sent rate by processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},bytesSent] Preprocessing
|
{#JMXNAME}: Errors per second | Error rate of request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},errorCount] Preprocessing
|
{#JMXNAME}: Requests per second | Rate of requests served by request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},requestCount] Preprocessing
|
{#JMXNAME}: Requests processing time | The total time to process all incoming requests of request processor {#JMXNAME} |
JMX agent | jmx[{#JMXOBJ},processingTime] Preprocessing
|
LLD rule Protocol handlers discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Protocol handlers discovery | Discovery for ProtocolHandler |
JMX agent | jmx.discovery[attributes,"Catalina:type=ProtocolHandler,port=*"] |
Item prototypes for Protocol handlers discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXVALUE}: Gzip compression status | Gzip compression status on {#JMXNAME}. Enabling gzip compression may save server bandwidth. |
JMX agent | jmx[{#JMXOBJ},compression] Preprocessing
|
Trigger prototypes for Protocol handlers discovery
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
{#JMXVALUE}: Gzip compression is disabled | gzip compression is disabled for connector {#JMXVALUE}. |
find(/Apache Tomcat by JMX/jmx[{#JMXOBJ},compression],,"like","off") = 1 |
Info | Manual close: Yes |
LLD rule Thread pools discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Thread pools discovery | Discovery for ThreadPool |
JMX agent | jmx.discovery[beans,"Catalina:type=ThreadPool,name=*"] |
Item prototypes for Thread pools discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXNAME}: Threads count | Amount of threads the thread pool has right now, both busy and free. |
JMX agent | jmx[{#JMXOBJ},currentThreadCount] Preprocessing
|
{#JMXNAME}: Threads limit | Limit of the threads count. When currentThreadsBusy counter reaches the maxThreads limit, no more requests could be handled, and the application chokes. |
JMX agent | jmx[{#JMXOBJ},maxThreads] Preprocessing
|
{#JMXNAME}: Threads busy | Number of the requests that are being currently handled. |
JMX agent | jmx[{#JMXOBJ},currentThreadsBusy] |
Trigger prototypes for Thread pools discovery
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
{#JMXNAME}: Busy worker threads count is high | When current threads busy counter reaches the limit, no more requests could be handled, and the application chokes. |
min(/Apache Tomcat by JMX/jmx[{#JMXOBJ},currentThreadsBusy],{$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"})>last(/Apache Tomcat by JMX/jmx[{#JMXOBJ},maxThreads])*{$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}/100 |
High |
LLD rule Contexts discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Contexts discovery | Discovery for contexts |
JMX agent | jmx.discovery[beans,"Catalina:type=Manager,host=,context="] |
Item prototypes for Contexts discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
{#JMXHOST}{#JMXCONTEXT}: Sessions active | Active sessions of the application. |
JMX agent | jmx[{#JMXOBJ},activeSessions] |
{#JMXHOST}{#JMXCONTEXT}: Sessions active maximum so far | Maximum number of active sessions so far. |
JMX agent | jmx[{#JMXOBJ},maxActive] |
{#JMXHOST}{#JMXCONTEXT}: Sessions created per second | Rate of sessions created by this application per second. |
JMX agent | jmx[{#JMXOBJ},sessionCounter] Preprocessing
|
{#JMXHOST}{#JMXCONTEXT}: Sessions rejected per second | Rate of sessions we rejected due to maxActive being reached. |
JMX agent | jmx[{#JMXOBJ},rejectedSessions] Preprocessing
|
{#JMXHOST}{#JMXCONTEXT}: Sessions allowed maximum | The maximum number of active Sessions allowed, or -1 for no limit. |
JMX agent | jmx[{#JMXOBJ},maxActiveSessions] |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/tomcat_jmx?at=release/5.4
Apache Tomcat by JMX
Overview
For Zabbix version: 5.4 and higher
Official JMX Template for Apache Tomcat.
This template was tested on:
- Apache Tomcat, version 8.5.59
Setup
See Zabbix template operation for basic instructions.
Metrics are collected by JMX.
- Enable and configure JMX access to Apache Tomcat. See documentation for instructions (chose your version).
- If your Tomcat installation require authentication for JMX, set values in host macros {$TOMCAT.USERNAME} and {$TOMCAT.PASSWORD}.
- You can set custom macro values and add macros with context for specific metrics following macro description.
Zabbix configuration
No specific Zabbix configuration is required.
Macros used
Name | Description | Default |
---|---|---|
{$TOMCAT.LLD.FILTER.MATCHES} | Filter for discoverable objects. Can be used with following contexts: "GlobalRequestProcessor", "ThreadPool", "Manager" |
.* |
{$TOMCAT.LLD.FILTER.NOT_MATCHES} | Filter to exclude discovered objects. Can be used with following contexts: "GlobalRequestProcessor", "ThreadPool", "Manager" |
CHANGE IF NEEDED |
{$TOMCAT.PASSWORD} | Password for JMX |
`` |
{$TOMCAT.THREADS.MAX.PCT} | Threshold for busy worker threads trigger. Can be used with {#JMXNAME} as context. |
75 |
{$TOMCAT.THREADS.MAX.TIME} | The time during which the number of busy threads can exceed the threshold. Can be used with {#JMXNAME} as context. |
5m |
{$TOMCAT.USER} | User for JMX |
`` |
Template links
There are no template links in this template.
Discovery rules
Name | Description | Type | Key and additional info |
---|---|---|---|
Global request processors discovery | Discovery for GlobalRequesProcessor |
JMX | jmx.discovery[beans,"Catalina:type=GlobalRequestProcessor,name=*"] Filter: AND- {#JMXNAME} MATCHES_REGEX - {#JMXNAME} NOT_MATCHES_REGEX |
Protocol handlers discovery | Discovery for ProtocolHandler |
JMX | jmx.discovery[attributes,"Catalina:type=ProtocolHandler,port=*"] Filter: AND- {#JMXATTR} MATCHES_REGEX |
Thread pools discovery | Discovery for ThreadPool |
JMX | jmx.discovery[beans,"Catalina:type=ThreadPool,name=*"] Filter: AND- {#JMXNAME} MATCHES_REGEX - {#JMXNAME} NOT_MATCHES_REGEX |
Contexts discovery | Discovery for contexts |
JMX | jmx.discovery[beans,"Catalina:type=Manager,host=,context="] Filter: AND- {#JMXHOST} MATCHES_REGEX - {#JMXHOST} NOT_MATCHES_REGEX |
Items collected
Group | Name | Description | Type | Key and additional info |
---|---|---|---|---|
Tomcat | Tomcat: Version | The version of the Tomcat. |
JMX | jmx["Catalina:type=Server",serverInfo] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
Tomcat | {#JMXNAME}: Bytes received per second | Bytes received rate by processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},bytesReceived] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXNAME}: Bytes sent per second | Bytes sent rate by processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},bytesSent] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXNAME}: Errors per second | Error rate of request processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},errorCount] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXNAME}: Requests per second | Rate of requests served by request processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},requestCount] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXNAME}: Requests processing time | The total time to process all incoming requests of request processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},processingTime] Preprocessing: - MULTIPLIER: |
Tomcat | {#JMXVALUE}: Gzip compression status | Gzip compression status on {#JMXNAME}. Enabling gzip compression may save server bandwidth. |
JMX | jmx[{#JMXOBJ},compression] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
Tomcat | {#JMXNAME}: Threads count | Amount of threads the thread pool has right now, both busy and free. |
JMX | jmx[{#JMXOBJ},currentThreadCount] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
Tomcat | {#JMXNAME}: Threads limit | Limit of the threads count. When currentThreadsBusy counter reaches the maxThreads limit, no more requests could be handled, and the application chokes. |
JMX | jmx[{#JMXOBJ},maxThreads] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
Tomcat | {#JMXNAME}: Threads busy | Number of the requests that are being currently handled. |
JMX | jmx[{#JMXOBJ},currentThreadsBusy] |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions active | Active sessions of the application. |
JMX | jmx[{#JMXOBJ},activeSessions] |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions active maximum so far | Maximum number of active sessions so far. |
JMX | jmx[{#JMXOBJ},maxActive] |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions created per second | Rate of sessions created by this application per second. |
JMX | jmx[{#JMXOBJ},sessionCounter] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions rejected per second | Rate of sessions we rejected due to maxActive being reached. |
JMX | jmx[{#JMXOBJ},rejectedSessions] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions allowed maximum | The maximum number of active Sessions allowed, or -1 for no limit. |
JMX | jmx[{#JMXOBJ},maxActiveSessions] |
Triggers
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Tomcat: Version has been changed | Tomcat version has changed. Ack to close. |
last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#1)<>last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#2) and length(last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo]))>0 |
INFO | Manual close: YES |
{#JMXVALUE}: Gzip compression is disabled | gzip compression is disabled for connector {#JMXVALUE}. |
find(/Apache Tomcat by JMX/jmx[{#JMXOBJ},compression],,"like","off") = 1 |
INFO | Manual close: YES |
{#JMXNAME}: Busy worker threads count are more than {$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}% of the limit for {$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"} | When current threads busy counter reaches the limit, no more requests could be handled, and the application chokes. |
min(/Apache Tomcat by JMX/jmx[{#JMXOBJ},currentThreadsBusy],{$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"})>last(/Apache Tomcat by JMX/jmx[{#JMXOBJ},maxThreads])*{$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}/100 |
HIGH |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide a feedback, discuss the template or ask for help with it at ZABBIX forums.
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/tomcat_jmx?at=release/5.0
Template App Apache Tomcat JMX
Overview
For Zabbix version: 5.0 and higher
Official JMX Template for Apache Tomcat.
This template was tested on:
- Apache Tomcat, version 8.5.59
- Zabbix, version 5.0, 5.2
Setup
See Zabbix template operation for basic instructions.
Metrics are collected by JMX.
- Enable and configure JMX access to Apache Tomcat. See documentation for instructions (chose your version).
- If your Tomcat installation require authentication for JMX, set values in host macros {$TOMCAT.USERNAME} and {$TOMCAT.PASSWORD}.
- You can set custom macro values and add macros with context for specific metrics following macro description.
Zabbix configuration
No specific Zabbix configuration is required.
Macros used
Name | Description | Default |
---|---|---|
{$TOMCAT.LLD.FILTER.MATCHES} | Filter for discoverable objects. Can be used with following contexts: "GlobalRequestProcessor", "ThreadPool", "Manager" |
.* |
{$TOMCAT.LLD.FILTER.NOT_MATCHES} | Filter to exclude discovered objects. Can be used with following contexts: "GlobalRequestProcessor", "ThreadPool", "Manager" |
CHANGE IF NEEDED |
{$TOMCAT.PASSWORD} | Password for JMX |
`` |
{$TOMCAT.THREADS.MAX.PCT} | Threshold for busy worker threads trigger. Can be used with {#JMXNAME} as context. |
75 |
{$TOMCAT.THREADS.MAX.TIME} | The time during which the number of busy threads can exceed the threshold. Can be used with {#JMXNAME} as context. |
5m |
{$TOMCAT.USER} | User for JMX |
`` |
Template links
There are no template links in this template.
Discovery rules
Name | Description | Type | Key and additional info |
---|---|---|---|
Global request processors discovery | Discovery for GlobalRequestProcessor |
JMX | jmx.discovery[beans,"Catalina:type=GlobalRequestProcessor,name=*"] Filter: AND- A: {#JMXNAME} MATCHES_REGEX - B: {#JMXNAME} NOT_MATCHES_REGEX |
Protocol handlers discovery | Discovery for ProtocolHandler |
JMX | jmx.discovery[attributes,"Catalina:type=ProtocolHandler,port=*"] Filter: AND- A: {#JMXATTR} MATCHES_REGEX |
Thread pools discovery | Discovery for ThreadPool |
JMX | jmx.discovery[beans,"Catalina:type=ThreadPool,name=*"] Filter: AND- A: {#JMXNAME} MATCHES_REGEX - B: {#JMXNAME} NOT_MATCHES_REGEX |
Contexts discovery | Discovery for contexts |
JMX | jmx.discovery[beans,"Catalina:type=Manager,host=,context="] Filter: AND- A: {#JMXHOST} MATCHES_REGEX - B: {#JMXHOST} NOT_MATCHES_REGEX |
Items collected
Group | Name | Description | Type | Key and additional info |
---|---|---|---|---|
Tomcat | Tomcat: Version | The version of the Tomcat. |
JMX | jmx["Catalina:type=Server",serverInfo] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
Tomcat | {#JMXNAME}: Bytes received per second | Bytes received rate by processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},bytesReceived] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXNAME}: Bytes sent per second | Bytes sent rate by processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},bytesSent] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXNAME}: Errors per second | Error rate of request processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},errorCount] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXNAME}: Requests per second | Rate of requests served by request processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},requestCount] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXNAME}: Requests processing time | The total time to process all incoming requests of request processor {#JMXNAME} |
JMX | jmx[{#JMXOBJ},processingTime] Preprocessing: - MULTIPLIER: |
Tomcat | {#JMXVALUE}: Gzip compression status | Gzip compression status on {#JMXNAME}. Enabling gzip compression may save server bandwidth. |
JMX | jmx[{#JMXOBJ},compression] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
Tomcat | {#JMXNAME}: Threads count | Amount of threads the thread pool has right now, both busy and free. |
JMX | jmx[{#JMXOBJ},currentThreadCount] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
Tomcat | {#JMXNAME}: Threads limit | Limit of the threads count. When currentThreadsBusy counter reaches the maxThreads limit, no more requests could be handled, and the application chokes. |
JMX | jmx[{#JMXOBJ},maxThreads] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
Tomcat | {#JMXNAME}: Threads busy | Number of the requests that are being currently handled. |
JMX | jmx[{#JMXOBJ},currentThreadsBusy] |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions active | Active sessions of the application. |
JMX | jmx[{#JMXOBJ},activeSessions] |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions active maximum so far | Maximum number of active sessions so far. |
JMX | jmx[{#JMXOBJ},maxActive] |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions created per second | Rate of sessions created by this application per second. |
JMX | jmx[{#JMXOBJ},sessionCounter] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions rejected per second | Rate of sessions we rejected due to maxActive being reached. |
JMX | jmx[{#JMXOBJ},rejectedSessions] Preprocessing: - CHANGE_PER_SECOND |
Tomcat | {#JMXHOST}{#JMXCONTEXT}: Sessions allowed maximum | The maximum number of active Sessions allowed, or -1 for no limit. |
JMX | jmx[{#JMXOBJ},maxActiveSessions] |
Triggers
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Tomcat: Version has been changed | Tomcat version has changed. Ack to close. |
{TEMPLATE_NAME:jmx["Catalina:type=Server",serverInfo].diff()}=1 and {TEMPLATE_NAME:jmx["Catalina:type=Server",serverInfo].strlen()}>0 |
INFO | Manual close: YES |
{#JMXVALUE}: Gzip compression is disabled | gzip compression is disabled for connector {#JMXVALUE}. |
{TEMPLATE_NAME:jmx[{#JMXOBJ},compression].str(off)} = 1 |
INFO | Manual close: YES |
{#JMXNAME}: Busy worker threads count are more than {$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}% of the limit for {$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"} | When current threads busy counter reaches the limit, no more requests could be handled, and the application chokes. |
{TEMPLATE_NAME:jmx[{#JMXOBJ},currentThreadsBusy].min({$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"})}>{TEMPLATE_NAME:jmx[{#JMXOBJ},maxThreads].last()}*{$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}/100 |
HIGH |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide a feedback, discuss the template or ask for help with it at ZABBIX forums.