245 lines
6.9 KiB
INI
245 lines
6.9 KiB
INI
# Tomcat specific checks
|
|
# ========================================================
|
|
|
|
include common.cfg
|
|
|
|
# Requests per minute for a servlet
|
|
# $0: Web-Module name
|
|
# $1: Servlet name
|
|
# $2: Critical (optional)
|
|
# $3: Warning (optional)
|
|
# $4: Name (optional)
|
|
<Check tc_servlet_requests>
|
|
MBean = *:j2eeType=Servlet,WebModule=$0,name=$1,*
|
|
Use = count_per_minute("requests")
|
|
Attribute = requestCount
|
|
Name = ${4:request}
|
|
Critical = ${2:6000}
|
|
Warning = ${3:5000}
|
|
</Check>
|
|
|
|
# Check whether an webmodule (can contain multiple servlets)
|
|
# is running
|
|
# $0: Webmodule name (sth like "//localhost/j4p")
|
|
# $1: Name (optional)
|
|
<Check tc_webmodule_running>
|
|
MBean = *:j2eeType=WebModule,name=$0,*
|
|
Attribute = state
|
|
String = 1
|
|
Label = $0 running
|
|
Name = ${1:running}
|
|
Critical = !1
|
|
</Check>
|
|
|
|
# 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 (optional)
|
|
# $2: Warning (optional)
|
|
# $3: Name (optional)
|
|
<Check tc_webmodule_processing>
|
|
MBean = *:j2eeType=WebModule,name=$0,*
|
|
Attribute = processingTime
|
|
Delta = 60
|
|
Label = %2.0f ms request processing time / minute
|
|
Name = ${3:proc_time}
|
|
Critical = ${1:50000}
|
|
Warning = ${2:40000}
|
|
</Check>
|
|
|
|
# ========================================================
|
|
# Session related checks
|
|
|
|
# Number of active sessions at this moment
|
|
# $0: Path name without leading slash
|
|
# $1: Critical (optional)
|
|
# $2: Warning (optional)
|
|
<Check tc_session_active>
|
|
MBean = *:path=/$0,type=Manager,*
|
|
Attribute = activeSessions
|
|
Name = ${3:sessions_active}
|
|
Label = $0: Active Sessions = %v
|
|
Critical = ${1:1000}
|
|
Warning = ${2:800}
|
|
</Check>
|
|
|
|
# Maximum number of active sessions so far
|
|
# $0: Path name without leading slash
|
|
# $1: Critical (optional)
|
|
# $2: Warning (optional)
|
|
# $3: Name (optional)
|
|
<Check tc_session_active_max>
|
|
MBean = *:path=/$0,type=Manager,*
|
|
Attribute = maxActive
|
|
Name = ${3:sessions_max}
|
|
Label = $0: Max-Active Sessions = %v
|
|
Critical = ${1:1000}
|
|
Warning = ${2:800}
|
|
</Check>
|
|
|
|
# Number of sessions we rejected due to maxActive beeing reached
|
|
# $0: Path name without leading slash
|
|
# $1: Critical (optional)
|
|
# $2: Warning (optional)
|
|
# $3: Name (optional)
|
|
<Check tc_session_rejected>
|
|
MBean = *:path=/$0,type=Manager,*
|
|
Attribute = rejectedSessions
|
|
Name = ${3:sessions_rejected}
|
|
Label = $0: Rejected Sessions = %v
|
|
Critical = ${1:500}
|
|
Warning = ${2:200}
|
|
</Check>
|
|
|
|
# Average time an expired session had been alive
|
|
# in seconds
|
|
# $0: Path name without leading slash
|
|
# $1: Critical (7200)
|
|
# $2: Warning (7200)
|
|
# $3: Name (optional)
|
|
<Check tc_session_average_lifetime>
|
|
MBean = *:path=/$0,type=Manager,*
|
|
Attribute = sessionAverageAliveTime
|
|
Name = ${3:sessions_avg_life}
|
|
Label = $0: Average session lifetime = %v
|
|
Critical = ${1:7200}
|
|
Warning = ${2:6400}
|
|
</Check>
|
|
|
|
# Longest time an expired session had been alive
|
|
# in seconds
|
|
# $0: Path name without leading slash
|
|
# $1: Critical (7200)
|
|
# $2: Warning (6400)
|
|
# $3: Name (optional)
|
|
<Check tc_session_max_lifetime>
|
|
MBean = *:path=/$0,type=Manager,*
|
|
Attribute = sessionMaxAliveTime
|
|
Name = ${3:sessions_max_life}
|
|
Label = $0: Maximum session lifetime = %v
|
|
Critical = ${1:7200}
|
|
Warning = ${2:6400}
|
|
</Check>
|
|
|
|
# Increase rate of sessions per minute
|
|
# $0: Path name without leading slash
|
|
# $1: Critical (optional)
|
|
# $2: Warning (optional)
|
|
# $3: Name (optional)
|
|
<Check tc_session_inc>
|
|
Use = count_per_minute("sessions")
|
|
MBean = *:path=/$0,type=Manager,*
|
|
Attribute = sessionCounter
|
|
Name = ${3:sessions_inc}
|
|
Critical = ${1:1000}
|
|
Warning = ${2:900}
|
|
</Check>
|
|
|
|
# =============================================================
|
|
# Connector related checks
|
|
|
|
# Number of connector threads in relation to maximum
|
|
# allowed connector threads
|
|
# $0: Name of connector (e.g. 'http-8080')
|
|
# $1: Critical (optional)
|
|
# $2: Warning (optional)
|
|
<Check tc_connector_threads>
|
|
Use = relative_base($1,$2)
|
|
Label = Connector $0 : $BASE
|
|
Name = ${3:connector_threads}
|
|
Value = *:type=ThreadPool,name=$0/currentThreadsBusy
|
|
Base = *:type=ThreadPool,name=$0/maxThreads
|
|
</Check>
|
|
|
|
|
|
# Number of bytes received per minute for a connector
|
|
# $0: Name of connector (e.g. 'http-8080')
|
|
# $1: Critical (optional)
|
|
# $2: Warning (optional)
|
|
# $3: Name (optional)
|
|
<Check tc_connector_received_rate>
|
|
Use = count_per_minute("bytes received")
|
|
Label = Connector $0 : $BASE
|
|
Name = ${3:bytes_received}
|
|
Value = *:type=GlobalRequestProcessor,name=$0/bytesReceived
|
|
Critical = ${1:104857600}
|
|
Warning = ${2:83886080}
|
|
</Check>
|
|
|
|
# Number of bytes sent per minute for a connector
|
|
# $0: Name of connector (e.g. 'http-8080')
|
|
# $1: Critical (optional)
|
|
# $2: Warning (optional)
|
|
# $3: Name (optional)
|
|
<Check tc_connector_sent_rate>
|
|
Use = count_per_minute("bytes sent")
|
|
Label = Connector $0 : $BASE
|
|
Name = ${3:bytes_sent}
|
|
Value = *:type=GlobalRequestProcessor,name=$0/bytesSent
|
|
Critical = ${1:104857600}
|
|
Warning = ${2:83886080}
|
|
</Check>
|
|
|
|
# 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 (optional)
|
|
# $2: Warning (optional)
|
|
# $3: Name (optional)
|
|
<Check tc_connector_processing_time>
|
|
Delta = 60
|
|
Label = Connector $0 : %2.0f ms request processing time / minute
|
|
Name = ${3:proc_time}
|
|
Value = *:type=GlobalRequestProcessor,name=$0/processingTime
|
|
Critical = ${1:50000}
|
|
Warning = ${2:40000}
|
|
</Check>
|
|
|
|
# Requests per minute for a connector
|
|
# $0: Connector name
|
|
# $1: Critical (optional)
|
|
# $2: Warning (optional)
|
|
# $3: Name (optional)
|
|
<Check tc_connector_requests>
|
|
Use = count_per_minute("requests")
|
|
Label = Connector $0 : $BASE
|
|
Name = ${3:nr_requests}
|
|
Value = *:type=GlobalRequestProcessor,name=$0/requestCount
|
|
Critical = ${1:1000}
|
|
Warning = ${2:900}
|
|
</Check>
|
|
|
|
# Number of errors for a connector per minute.
|
|
# $0: Connector name
|
|
# $1: Critical (optional)
|
|
# $2: Warning (optional)
|
|
# $3: Name (optional)
|
|
<Check tc_connector_error_count>
|
|
Value = *:type=GlobalRequestProcessor,name=$0/errorCount
|
|
Label = Connector $0: %d errors
|
|
Name = ${3:errors}
|
|
Critical = ${1:100}
|
|
Warning = ${2:90}
|
|
Delta = 60
|
|
</Check>
|
|
|
|
# ==================================================================
|
|
# 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 <GlobalResources> 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 (optional)
|
|
# $2: Warning value (optional)
|
|
# $3: Name (optional)
|
|
<Check tc_datasource_connections>
|
|
Value = *:name="$0",type=DataSource,*/numActive
|
|
Base = *:name="$0",type=DataSource,*/maxActive
|
|
Name = ${3:dbpool_used}
|
|
Label = %.2r% DB connections used (%v %u active / %b %w max)
|
|
Critical = ${1:90}
|
|
Warning = ${2:80}
|
|
</Check> |