Tomcat Profile (JMX)
This profile monitors the health of a Tomcat server via JMX (Java Management Extensions). The approach of using JMX allows for the customer to extend monitoring to any MBean (managed bean). An MBean is a Java object representing a manageable resource.
![]() | You may want to refer to http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html for information on how to set up the Tomcat JMX profile and catalina.sh. |
Services Configuration
- Service - Definitions in Monarch are stored under this name.
- Command Line - Service command name with arguments to be passed to the plugin.
- Plugin Command Line - Plugin script called by Nagios for this Service.
- Extended Info - The Extended Service Info definition, typically used for generating graphs.
Command lines displayed below are intended to be single line commands. Service Command Line Plugin Command Line jmx_tomcat_CollectionCount check_jvm!java.lang:name=Copy,
type=GarbageCollector!CollectionCount$USER1$/check_jvm.pl -H $HOSTADDRESS$ -m "$ARG1$" -p $USER28$ -u $USER29$ -P $USER30$ -a "$ARG2$" jmx_tomcat_CollectionTime check_jvm!java.lang:name=Copy,
type=GarbageCollector!CollectionTime$USER1$/check_jvm.pl -H $HOSTADDRESS$ -m "$ARG1$" -p $USER28$ -u $USER29$ -P $USER30$ -a "$ARG2$" jmx_tomcat_bytesSent check_jvm!Catalina:type=GlobalRequestProcessor,
name=http-8080!bytesSent$USER1$/check_jvm.pl -H $HOSTADDRESS$ -m "$ARG1$" -p $USER28$ -u $USER29$ -P $USER30$ -a "$ARG2$" jmx_tomcat_currentThreadCount check_jvm_th!Catalina:name=http-8080,type=ThreadPool!currentThreadCount!50!100 $USER1$/check_jvm.pl -H $HOSTADDRESS$ -m "$ARG1$" -p $USER28$ -u $USER29$ -P $USER30$ -a "$ARG2$" -w $ARG3$ -c $ARG4$ jmx_tomcat_currentThreadsBusy check_jvm_th!Catalina:name=http-8080,type=ThreadPool!currentThreadsBusy!50!100 $USER1$/check_jvm.pl -H $HOSTADDRESS$ -m "$ARG1$" -p $USER28$ -u $USER29$ -P $USER30$ -a "$ARG2$" -w $ARG3$ -c $ARG4$ jmx_tomcat_errorCount check_jvm_th!Catalina:type=GlobalRequestProcessor,
name=http-8080!errorCount!10!100$USER1$/check_jvm.pl -H $HOSTADDRESS$ -m "$ARG1$" -p $USER28$ -u $USER29$ -P $USER30$ -a "$ARG2$" -w $ARG3$ -c $ARG4$ jmx_tomcat_maxThreads check_jvm_th!Catalina:name=http-8080,type=ThreadPool!maxThreads!75!150 $USER1$/check_jvm.pl -H $HOSTADDRESS$ -m "$ARG1$" -p $USER28$ -u $USER29$ -P $USER30$ -a "$ARG2$" -w $ARG3$ -c $ARG4$ jmx_tomcat_maxTime check_jvm_th!Catalina:type=GlobalRequestProcessor,
name=http-8080!maxTime!1000!10000$USER1$/check_jvm.pl -H $HOSTADDRESS$ -m "$ARG1$" -p $USER28$ -u $USER29$ -P $USER30$ -a "$ARG2$" -w $ARG3$ -c $ARG4$ jmx_tomcat_processingTime check_jvm!Catalina:type=GlobalRequestProcessor,
name=http-8080!processingTime$USER1$/check_jvm.pl -H $HOSTADDRESS$ -m "$ARG1$" -p $USER28$ -u $USER29$ -P $USER30$ -a "$ARG2$" jmx_tomcat_requestCount check_jvm!Catalina:type=GlobalRequestProcessor,
name=http-8080!requestCount$USER1$/check_jvm.pl -H $HOSTADDRESS$ -m "$ARG1$" -p $USER28$ -u $USER29$ -P $USER30$ -a "$ARG2$"
Profile Package
This package includes the following files:
Profile Definitions
- service-profile-jmx-tomcat.xml
- perfconfig-jmx-tomcat.xml
Plugins Scripts
- check_jvm.pl
- nagtomcat.jar
- com/*
- data/*
- libs/*
Installation
GroundWork Monitor includes many monitoring profiles for a variety of devices, systems and applications. Profiles already imported on a new GroundWork installation include Service Ping, SNMP Network, and SSH UNIX. The GroundWork Monitor Configuration tool is used to import updated Profiles and Profiles that require additional setup; the Profile XML file and its companion Performance Configuration definition file. Services can also be imported in addition to Service Profiles in the Profile Importer. The import process is documented under GROUNDWORK PROFILES > How to import profiles.
Implementation
This section contains detail settings used by this Profile. These parameters can be altered with the Configuration tool.
Command Parameters
Command parameters are in the Configuration Services section with the following names and default values. Any bolded arguments MUST be set before this Service Profile will work properly.
jmx_tomcat_CollectionCount
- Garbage collection is the process that the Java virtual machine uses to find and reclaim unreachable objects to free up memory space. This check returns the number of collections that have occurred since the last call.
- $ARG1$ - Default value is ‘java.lang:name=Copy,type=GarbageCollector’. This is the name of the mbean.
- $ARG2$ - Default value is ‘CollectionCount’. This is the name of the mbean attribute.
- $USER28$ - JMX listener port. There is no default in the profile but this does need to be set. Default JMX listener port in Tomcat is 8004.
- $USER29$ - JMX user name. There is no default in the profile but this does need to be set.
- $USER30$ - JMX user password. There is no default in the profile but this does need to be set.
jmx_tomcat_CollectionTime
- This check returns the approximate accumulated collection elapsed time in milliseconds since last call.
- $ARG1$ - Default value is ‘java.lang:name=Copy,type=GarbageCollector’. This is the name of the mbean.
- $ARG2$ - Default value is ‘CollectionTime’. This is the name of the mbean attribute.
- $USER28$ - JMX listener port. here is no default in the profile but this does need to be set. Default JMX listener port in Tomcat is 8004.
- $USER29$ - JMX user name. There is no default in the profile but this does need to be set.
- $USER30$ - JMX user password. There is no default in the profile but this does need to be set.
jmx_tomcat_bytesSent
- This check returns the number of bytes sent by the Global Request Processor since last call.
- $ARG1$ - Default value is ‘Catalina:type=GlobalRequestProcessor,name=http-8080’. This is the name of the mbean.
- $ARG2$ - Default value is ‘bytesSent’. This is the name of the mbean attribute.
- $USER28$ - JMX listener port. There is no default in the profile but this does need to be set. Default JMX listener port in Tomcat is 8004.
- $USER29$ - JMX user name. There is no default in the profile but this does need to be set.
- $USER30$ - JMX user password. There is no default in the profile but this does need to be set.
jmx_tomcat_currentThreadCount
- This check returns the current number of threads in the thread pool.
- $ARG1$ - Default value is ‘Catalina:name=http-8080,type=ThreadPool’. This is the name of the mbean.
- $ARG2$ - Default value is ‘currentThreadCount’. This is the name of the mbean attribute.
- $USER28$ - JMX listener port. here is no default in the profile but this does need to be set. Default JMX listener port in Tomcat is 8004.
- $USER29$ - JMX user name. There is no default in the profile but this does need to be set.
- $USER30$ - JMX user password. There is no default in the profile but this does need to be set.
- $ARG3$ - Default value is 50. This is the warning threshold for comparison with the currentThreadCount attribute.
- $ARG4$ - Default value is 100. This is the critical threshold for comparison with the currentThreadCount attribute.
jmx_tomcat_currentThreadsBusy
- This check returns the number of busy threads in the thread pool.
- $ARG1$ - Default value is ‘Catalina:name=http-8080,type=ThreadPool’. This is the name of the mbean.
- $ARG2$ - Default value is ‘currentThreadsBusy’. This is the name of the mbean attribute.
- $USER28$ - JMX listener port. There is no default in the profile but this does need to be set. Default JMX listener port in Tomcat is 8004.
- $USER29$ - JMX user name. There is no default in the profile but this does need to be set.
- $USER30$ - JMX user password. There is no default in the profile but this does need to be set.
- $ARG3$ - Default value is 50. This is the warning threshold for comparison with the currentThreadsBusy attribute.
- $ARG4$ - Default value is 100. This is the critical threshold for comparison with the currentThreadsBusy attribute.
jmx_tomcat_errorCount
- This check returns the number of errors with requests to the Global Request Processor since last call.
- $ARG1$ - Default value is ‘Catalina:type=GlobalRequestProcessor,name=http-8080’. This is the name of the mbean.
- $ARG2$ - Default value is ‘errorCount’. This is the name of the mbean attribute.
- $USER28$ - JMX listener port. There is no default in the profile but this does need to be set. Default JMX listener port in Tomcat is 8004.
- $USER29$ - JMX user name. There is no default in the profile but this does need to be set.
- $USER30$ - JMX user password. There is no default in the profile but this does need to be set.
- $ARG3$ - Default value is 10. This is the warning threshold for comparison with the errorCount attribute.
- $ARG4$ - Default value is 100. This is the critical threshold for comparison with the errorCount attribute.
jmx_tomcat_maxThreads
- This check returns the maximum number of threads in the thread pool.
- $ARG1$ - Default value is ‘Catalina:name=http-8080,type=ThreadPool’. This is the name of the mbean.
- $ARG2$ - Default value is ‘maxThreads’. This is the name of the mbean attribute.
- $USER28$ - JMX listener port. There is no default in the profile but this does need to be set. Default JMX listener port in Tomcat is 8004.
- $USER29$ - JMX user name. There is no default in the profile but this does need to be set.
- $USER30$ - JMX user password. There is no default in the profile but this does need to be set.
- $ARG3$ - Default value is 75. This is the warning threshold for comparison with the maxThreads attribute.
- $ARG4$ - Default value is 150. This is the critical threshold for comparison with the maxThreads attribute.
jmx_tomcat_maxTime
- This check returns the maximum time any processing of a request took since last call.
- $ARG1$ - Default value is ‘Catalina:type=GlobalRequestProcessor,name=http-8080’. This is the name of the mbean.
- $ARG2$ - Default value is ‘maxTime’. This is the name of the mbean attribute.
- $USER28$ - JMX listener port. There is no default in the profile but this does need to be set. Default JMX listener port in Tomcat is 8004.
- $USER29$ - JMX user name. There is no default in the profile but this does need to be set.
- $USER30$ - JMX user password. There is no default in the profile but this does need to be set.
- $ARG3$ - Default value is 1000. This is the warning threshold for comparison with the maxTime attribute.
- $ARG4$ - Default value is 10000. This is the critical threshold for comparison with the maxTime attribute.
jmx_tomcat_processingTime
- This check returns the request processor processing time since last call.
- $ARG1$ - Default value is ‘Catalina:type=GlobalRequestProcessor,name=http-8080’. This is the name of the mbean.
- $ARG2$ - Default value is ‘processingTime’. This is the name of the mbean attribute.
- $USER28$ - JMX listener port. There is no default in the profile but this does need to be set. Default JMX listener port in Tomcat is 8004.
- $USER29$ - JMX user name. There is no default in the profile but this does need to be set.
- $USER30$ - JMX user password. There is no default in the profile but this does need to be set.
jmx_tomcat_requestCount
- This check returns the number of requests processed by this processor since last call.
- $ARG1$ - Default value is ‘Catalina:type=GlobalRequestProcessor,name=http-8080’. This is the name of the mbean.
- $ARG2$ - Default value is ‘requestCount’. This is the name of the mbean attribute.
- $USER28$ - JMX listener port. There is no default in the profile but this does need to be set. Default JMX listener port in Tomcat is 8004.
- $USER29$ - JMX user name. There is no default in the profile but this does need to be set.
- $USER30$ - JMX user password. There is no default in the profile but this does need to be set.
Performance Graphing Parameters
The following parameters are used to generate performance charts. These parameters are set using the Configuration>Performance tool in GroundWork Monitor.
jmx_tomcat_CollectionCount
- Graphs the number of collections that have occurred since the last call.
- The Nagios service description must match the string "jmx_tomcat_CollectionCount".
jmx_tomcat_CollectionTime
- Graphs the approximate accumulated collection elapsed time in milliseconds since last call.
- The Nagios service description must match the string "jmx_tomcat_CollectionTime".
jmx_tomcat_bytesSent
- Graphs the number of bytes sent by the Global Request Processor since last call.
- The Nagios service description must match the string "jmx_tomcat_bytesSent".
jmx_tomcat_currentThreadCount
- Graphs the current number of threads in the thread pool.
- The Nagios service description must match the string "jmx_tomcat_currentThreadCount".
jmx_tomcat_currentThreadsBusy
- Graphs the number of busy threads in the thread pool.
- The Nagios service description must match the string "jmx_tomcat_currentThreadsBusy".
jmx_tomcat_errorCount
- Graphs the number of errors with requests to the Global Request Processor since last call.
- The Nagios service description must match the string "jmx_tomcat_errorCount".
jmx_tomcat_maxThreads
- Graphs the maximum number of threads in the thread pool.
- The Nagios service description must match the string "jmx_tomcat_maxThreads".
jmx_tomcat_maxTime
- Graphs the maximum time any processing of a request took since last call.
- The Nagios service description must match the string "jmx_tomcat_maxTime".
jmx_tomcat_processingTime
- Graphs the request processor processing time since last call.
- The Nagios service description must match the string "jmx_tomcat_processingTime”.
jmx_tomcat_requestCount
- Graphs the number of requests processed by this processor since last call.
- The Nagios service description must match the string "jmx_tomcat_requestCount".
Implementation Notes
None.