# Tomcat specific checks # ======================================================== include common.cfg # Requests per minute for a servlet # $0: Web-Module name # $1: Servlet name # $2: Critical (default: 1000) # $3: Warning (default: 900) MBean = *:j2eeType=Servlet,WebModule=$0,name=$1,* Use = count_per_minute("requests") Attribute = requestCount Name = request Critical = ${2:6000} Warning = ${3:5000} # Check whether an webmodule (can contain multiple servlets) # is running # $0: Webmodule name (sth like "//localhost/j4p") MBean = *:j2eeType=WebModule,name=$0,* Attribute = state String = 1 Label = $0 running Name = running Critical = !1 # Increase of overall processing time per minute for a web module # This is calculate the processing time for a certain # interval and extrapolate to a minute # $0: Webmodule name # $1: Critical (default: 50000) # $2: Warning (default: 40000) MBean = *:j2eeType=WebModule,name=$0,* Attribute = processingTime Delta = 60 Label = %2.0f ms request processing time / minute Name = proc_time Critical = ${1:50000} Warning = ${2:40000} # ======================================================== # Session related checks # Number of active sessions at this moment # $0: Path name without leading slash # $1: Critical (Default: 1000) # $2: Warning (Default: 800) MBean = *:path=/$0,type=Manager,* Attribute = activeSessions Name = sessions_active Label = $0: Active Sessions = %v Critical = ${1:1000} Warning = ${2:800} # Maximum number of active sessions so far # $0: Path name without leading slash # $1: Critical # $2: Warning MBean = *:path=/$0,type=Manager,* Attribute = maxActive Name = sessions_max Label = $0: Max-Active Sessions = %v Critical = $1 Warning = $2 # Number of sessions we rejected due to maxActive beeing reached # $0: Path name without leading slash # $1: Critical (default: 1000) # $2: Warning (default: 900) MBean = *:path=/$0,type=Manager,* Attribute = rejectedSessions Name = sessions_rejected Label = $0: Rejected Sessions = %v Warning = 0 Critical = ${1:1000} Warning = ${2:900} # Average time an expired session had been alive # $0: Path name without leading slash # $1: Critical # $2: Warning MBean = *:path=/$0,type=Manager,* Attribute = sessionAverageAliveTime Name = sessions_avg_life Label = $0: Average session lifetime = %v Critical = $1 Warning = $2 # Longest time an expired session had been alive # $0: Path name without leading slash # $1: Critical # $2: Warning MBean = *:path=/$0,type=Manager,* Attribute = sessionMaxAliveTime Name = sessions_max_life Label = $0: Maximum session lifetime = %v Critical = $1 Warning = $2 # Increase rate of sessions per minute # $0: Path name without leading slash # $1: Critical (default: 1000) # $2: Warning (default: 900) Use = count_per_minute("sessions") MBean = *:path=/$0,type=Manager,* Attribute = sessionCounter Name = sessions_inc Critical = ${1:1000} Warning = ${2:900} # ============================================================= # Connector related checks # Number of connector threads in relation to maximum # allowed connector threads # $0: Name of connector (e.g. 'http-8080') # $1: Critical (default: 90%) # $2: Warning (default: 80%) Use = relative_base($1,$2) Label = Connector $0 : $BASE Name = connector_threads Value = *:type=ThreadPool,name=$0/currentThreadCount Base = *:type=ThreadPool,name=$0/maxThreads # Number of bytes received per minute for a connector # $0: Name of connector (e.g. 'http-8080') # $1: Critical (default: 100 MB) # $2: Warning (default: 80 MB) Use = count_per_minute("bytes received") Label = Connector $0 : $BASE Name = bytes_received Value = *:type=GlobalRequestProcessor,name=$0/bytesReceived Critical = ${1:104857600} Warning = ${2:83886080} # Number of bytes sent per minute for a connector # $0: Name of connector (e.g. 'http-8080') # $1: Critical (default: 100 MB) # $2: Warning (default: 80 MB) Use = count_per_minute("bytes sent") Label = Connector $0 : $BASE Name = bytes_sent Value = *:type=GlobalRequestProcessor,name=$0/bytesSent Critical = ${1:104857600} Warning = ${2:83886080} # Increase of overall processing time per minute for a connector # This checks calculates the processing time for a certain # interval and scale it to a minute # $0: Connector name # $1: Critical (default: 50000) # $2: Warning (default: 40000) Delta = 60 Label = Connector $0 : %2.0f ms request processing time / minute Name = proc_time Value = *:type=GlobalRequestProcessor,name=$0/processingTime Critical = ${1:50000} Warning = ${2:40000} # Requests per minute for a connector # $0: Connector name # $1: Critical (default: 1000) # $2: Warning (default: 900) Use = count_per_minute("requests") Label = Connector $0 : $BASE Name = nr_requests Value = *:type=GlobalRequestProcessor,name=$0/requestCount Critical = ${1:1000} Warning = ${2:900} # Number of errors for a connector per minute. # $0: Connector name # $1: Critical (default: 100) # $2: Warning (default: 90) Value = *:type=GlobalRequestProcessor,name=$0/errorCount Label = Connector $0: %d errors Name = errors Critical = ${1:100} Warning = ${2:90} Delta = 60 # ================================================================== # Relative DB Pool check (active connection vs. maximal available connections) # Note that you need to register the datasource globally in order # to access the Pool statistics (i.e. within the sections) # See http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html # for more information # $0: JNDI-Name of datasource (e.g. jdbc/TestDB) # $1: Critical value (default: 90%) # $2: Warning value (default: 80%) Value = *:name="$0",type=DataSource/numActive,* Base = *:name="$0",type=DataSource/maxActive,* Name = dbpool_used Label = %.2r% DB connections used (%v %u active / %b %w max) Critical = ${1:90} Warning = ${2:80}