Skip to content

Commit 1060c00

Browse files
committed
Add missing JMX metrics for ContainerInsights.
1 parent 6eac60e commit 1060c00

File tree

2 files changed

+165
-0
lines changed

2 files changed

+165
-0
lines changed

instrumentation/jmx-metrics/src/main/resources/jmx/rules/jvm.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,37 @@ rules:
5454
ThreadCount:
5555
metric: count
5656
desc: Number of threads
57+
DaemonThreadCount:
58+
metric: daemon
59+
desc: Number of daemon threads
5760
- bean: java.lang:type=OperatingSystem,*
5861
prefix: jvm.cpu.
5962
type: gauge
6063
mapping:
64+
TotalSwapSpaceSize:
65+
metric: jvm.system.swap.space.total
66+
desc: The host swap memory size in bytes
67+
unit: by
68+
FreeSwapSpaceSize:
69+
metric: jvm.system.swap.space.free
70+
desc: The amount of available swap memory in bytes
71+
unit: by
72+
TotalPhysicalMemorySize:
73+
metric: jvm.system.physical.memory.total
74+
desc: The total physical memory size in host
75+
unit: by
76+
FreePhysicalMemorySize:
77+
metric: jvm.system.physical.memory.free
78+
desc: The amount of free physical memory in host
79+
unit: by
80+
AvailableProcessors:
81+
metric: jvm.system.available.processors
82+
desc: The number of available processors
83+
unit: "1"
84+
SystemCpuLoad:
85+
metric: jvm.system.cpu.utilization
86+
desc: The current load of CPU in host
87+
unit: "1"
6188
ProcessCpuTime:
6289
metric: time
6390
unit: ns
@@ -66,3 +93,7 @@ rules:
6693
metric: recent_utilization
6794
unit: "1"
6895
desc: Recent CPU utilization for the process
96+
OpenFileDescriptorCount:
97+
metric: jvm.fd.open.count
98+
desc: The number of opened file descriptors
99+
unit: "1"
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---
2+
rules:
3+
- bean: Catalina:type=Manager,host=localhost,context=*
4+
unit: sessions
5+
type: gauge
6+
mapping:
7+
activeSessions:
8+
metric: tomcat.sessions
9+
desc: The number of active sessions.
10+
rejectedSessions:
11+
metric: tomcat.rejected_sessions
12+
desc: The number of rejected sessions.
13+
- bean: Catalina:type=GlobalRequestProcessor,name=*
14+
metricAttribute:
15+
name: param(name)
16+
mapping:
17+
errorCount:
18+
metric: tomcat.errors
19+
type: counter
20+
unit: errors
21+
desc: The number of errors encountered.
22+
requestCount:
23+
metric: tomcat.request_count
24+
type: counter
25+
unit: requests
26+
desc: The total requests.
27+
maxTime:
28+
metric: tomcat.max_time
29+
type: gauge
30+
unit: ms
31+
desc: Maximum time to process a request
32+
processingTime:
33+
metric: tomcat.processing_time
34+
type: counter
35+
unit: ms
36+
desc: The total processing time.
37+
bytesReceived:
38+
metric: tomcat.traffic
39+
metricAttribute:
40+
direction: const(received)
41+
type: counter
42+
unit: by
43+
desc: The number of bytes transmitted and received.
44+
bytesSent:
45+
metric: tomcat.traffic
46+
metricAttribute:
47+
direction: const(sent)
48+
type: counter
49+
unit: by
50+
desc: The number of bytes transmitted and received.
51+
- bean: Catalina:type=ThreadPool,name=*
52+
metricAttribute:
53+
name: param(name)
54+
mapping:
55+
currentThreadCount:
56+
metric: tomcat.threads
57+
metricAttribute:
58+
state: const(idle)
59+
type: gauge
60+
unit: threads
61+
desc: The number of threads
62+
currentThreadsBusy:
63+
metric: tomcat.threads
64+
metricAttribute:
65+
state: const(busy)
66+
type: gauge
67+
unit: threads
68+
desc: The number of threads
69+
- bean: Tomcat:type=Manager,host=localhost,context=*
70+
unit: sessions
71+
type: gauge
72+
mapping:
73+
activeSessions:
74+
metric: tomcat.sessions
75+
desc: The number of active sessions.
76+
rejectedSessions:
77+
metric: tomcat.rejected_sessions
78+
desc: The number of rejected sessions.
79+
- bean: Tomcat:type=GlobalRequestProcessor,name=*
80+
metricAttribute:
81+
name: param(name)
82+
mapping:
83+
errorCount:
84+
metric: tomcat.errors
85+
type: counter
86+
unit: errors
87+
desc: The number of errors encountered.
88+
requestCount:
89+
metric: tomcat.request_count
90+
type: counter
91+
unit: requests
92+
desc: The total requests.
93+
maxTime:
94+
metric: tomcat.max_time
95+
type: gauge
96+
unit: ms
97+
desc: Maximum time to process a request
98+
processingTime:
99+
metric: tomcat.processing_time
100+
type: counter
101+
unit: ms
102+
desc: The total processing time.
103+
bytesReceived:
104+
metric: tomcat.traffic
105+
metricAttribute:
106+
direction: const(received)
107+
type: counter
108+
unit: by
109+
desc: The number of bytes transmitted and received.
110+
bytesSent:
111+
metric: tomcat.traffic
112+
metricAttribute:
113+
direction: const(sent)
114+
type: counter
115+
unit: by
116+
desc: The number of bytes transmitted and received.
117+
- bean: Tomcat:type=ThreadPool,name=*
118+
metricAttribute:
119+
name: param(name)
120+
mapping:
121+
currentThreadCount:
122+
metric: tomcat.threads
123+
metricAttribute:
124+
state: const(idle)
125+
type: gauge
126+
unit: threads
127+
desc: The number of threads
128+
currentThreadsBusy:
129+
metric: tomcat.threads
130+
metricAttribute:
131+
state: const(busy)
132+
type: gauge
133+
unit: threads
134+
desc: The number of threads

0 commit comments

Comments
 (0)