remove duplication in tomcat JMX config (#12172)
This commit is contained in:
parent
1ab2dbf8bc
commit
eb6624b5ea
|
@ -1,48 +1,11 @@
|
||||||
---
|
---
|
||||||
# For Tomcat, the default JMX domain is "Catalina:", however with some deployments like embedded in spring-boot
|
# For Tomcat, the default JMX domain is "Catalina:", however with some deployments like embedded in spring-boot
|
||||||
# we can have the "Tomcat:" domain used, thus we have to duplicate metrics definitions as using a wildcard
|
# we can have the "Tomcat:" domain used, thus we use both MBean names for the metrics.
|
||||||
# would match too broadly
|
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- bean: Catalina:type=GlobalRequestProcessor,name=*
|
- beans:
|
||||||
unit: "1"
|
- Catalina:type=GlobalRequestProcessor,name=*
|
||||||
prefix: http.server.tomcat.
|
- Tomcat:type=GlobalRequestProcessor,name=*
|
||||||
metricAttribute:
|
|
||||||
name: param(name)
|
|
||||||
mapping:
|
|
||||||
errorCount:
|
|
||||||
metric: errorCount
|
|
||||||
type: gauge
|
|
||||||
desc: The number of errors per second on all request processors
|
|
||||||
requestCount:
|
|
||||||
metric: requestCount
|
|
||||||
type: gauge
|
|
||||||
desc: The number of requests per second across all request processors
|
|
||||||
maxTime:
|
|
||||||
metric: maxTime
|
|
||||||
type: gauge
|
|
||||||
unit: ms
|
|
||||||
desc: The longest request processing time
|
|
||||||
processingTime:
|
|
||||||
metric: processingTime
|
|
||||||
type: counter
|
|
||||||
unit: ms
|
|
||||||
desc: Total time for processing all requests
|
|
||||||
bytesReceived:
|
|
||||||
metric: traffic
|
|
||||||
type: counter
|
|
||||||
unit: By
|
|
||||||
desc: The number of bytes transmitted
|
|
||||||
metricAttribute:
|
|
||||||
direction: const(received)
|
|
||||||
bytesSent:
|
|
||||||
metric: traffic
|
|
||||||
type: counter
|
|
||||||
unit: By
|
|
||||||
desc: The number of bytes transmitted
|
|
||||||
metricAttribute:
|
|
||||||
direction: const(sent)
|
|
||||||
- bean: Tomcat:type=GlobalRequestProcessor,name=*
|
|
||||||
unit: "1"
|
unit: "1"
|
||||||
prefix: http.server.tomcat.
|
prefix: http.server.tomcat.
|
||||||
metricAttribute:
|
metricAttribute:
|
||||||
|
@ -81,17 +44,9 @@ rules:
|
||||||
metricAttribute:
|
metricAttribute:
|
||||||
direction: const(sent)
|
direction: const(sent)
|
||||||
|
|
||||||
- bean: Catalina:type=Manager,host=localhost,context=*
|
- beans:
|
||||||
unit: "1"
|
- Catalina:type=Manager,host=localhost,context=*
|
||||||
prefix: http.server.tomcat.
|
- Tomcat:type=Manager,host=localhost,context=*
|
||||||
type: updowncounter
|
|
||||||
metricAttribute:
|
|
||||||
context: param(context)
|
|
||||||
mapping:
|
|
||||||
activeSessions:
|
|
||||||
metric: sessions.activeSessions
|
|
||||||
desc: The number of active sessions
|
|
||||||
- bean: Tomcat:type=Manager,host=localhost,context=*
|
|
||||||
unit: "1"
|
unit: "1"
|
||||||
prefix: http.server.tomcat.
|
prefix: http.server.tomcat.
|
||||||
type: updowncounter
|
type: updowncounter
|
||||||
|
@ -102,24 +57,9 @@ rules:
|
||||||
metric: sessions.activeSessions
|
metric: sessions.activeSessions
|
||||||
desc: The number of active sessions
|
desc: The number of active sessions
|
||||||
|
|
||||||
- bean: Catalina:type=ThreadPool,name=*
|
- beans:
|
||||||
unit: "{threads}"
|
- Catalina:type=ThreadPool,name=*
|
||||||
prefix: http.server.tomcat.
|
- Tomcat:type=ThreadPool,name=*
|
||||||
type: updowncounter
|
|
||||||
metricAttribute:
|
|
||||||
name: param(name)
|
|
||||||
mapping:
|
|
||||||
currentThreadCount:
|
|
||||||
metric: threads
|
|
||||||
desc: Thread Count of the Thread Pool
|
|
||||||
metricAttribute:
|
|
||||||
state: const(idle)
|
|
||||||
currentThreadsBusy:
|
|
||||||
metric: threads
|
|
||||||
desc: Thread Count of the Thread Pool
|
|
||||||
metricAttribute:
|
|
||||||
state: const(busy)
|
|
||||||
- bean: Tomcat:type=ThreadPool,name=*
|
|
||||||
unit: "{threads}"
|
unit: "{threads}"
|
||||||
prefix: http.server.tomcat.
|
prefix: http.server.tomcat.
|
||||||
type: updowncounter
|
type: updowncounter
|
||||||
|
@ -136,3 +76,4 @@ rules:
|
||||||
desc: Thread Count of the Thread Pool
|
desc: Thread Count of the Thread Pool
|
||||||
metricAttribute:
|
metricAttribute:
|
||||||
state: const(busy)
|
state: const(busy)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue