Checks the tomcat /manager/status page for excessive memory usage or an excessive number of threads in use. This plugin does a HTTP GET of the tomcat status page:
/manager/status?XML=true
It checks the resulting XML for:
In order to use this, you must provide a username and password that has a 'manager-gui' role in the CATALINA_HOME/conf/tomcat-users.xml file.
Supported parameters are:
In the following example we will check for the amount of jvm memory in use.
<command name="CHECK_TOMCAT" plugin_name="CHECK_TOMCAT"> <arg name="memory"/> <arg name="hostname" value="$ARG1$" /> <arg name="port" value="$ARG2$" /> <arg name="database" value="$ARG3$" /> <arg name="user" value="$ARG4$" /> <arg name="password" value="$ARG5$" /> <arg name="warning" value="$ARG6$" /> <arg name="critical" value="$ARG7$" /> </command>
CHECK_TOMCAT : CHECK_TOMCAT --memory --hostname $ARG1$ --port $ARG2$ --database $ARG3$ --user $ARG4$ --password $ARG5$ --warning $ARG6$ --critical $ARG7$
Any of the parameters ($ARG?$ macros) could be hardcoded inside the JNRPE configuration.
The following will throw a warning if 50% or less of the maximum memory less is available and a critical if 10% or less of the maximum memory is available.
check_nrpe -n -H 127.0.0.1 -c CHECK_TOMCAT -a localhost 8080 username password :50% :10%
In the following example we will check for the amount of threads available.
<command name="CHECK_TOMCAT" plugin_name="CHECK_TOMCAT"> <arg name="threads"/> <arg name="hostname" value="$ARG1$" /> <arg name="port" value="$ARG2$" /> <arg name="database" value="$ARG3$" /> <arg name="user" value="$ARG4$" /> <arg name="password" value="$ARG5$" /> <arg name="warning" value="$ARG6$" /> <arg name="critical" value="$ARG7$" /> </command>