forked from collectd/collectd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGenericJMX.conf
245 lines (219 loc) · 6.53 KB
/
GenericJMX.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# contrib/GenericJMX.conf
# -----------------------
#
# This is an example config file for the ‘GenericJMX’ plugin, a plugin written
# in Java to receive values via the “Java Management Extensions” (JMX). The
# plugin can be found in the
# bindings/java/org/collectd/java/
# directory of the source distribution.
#
# This sample config defines a couple of <MBean /> blocks which query MBeans
# provided by the JVM itself, i. e. which should be available for all Java
# processes. The following MBean blocks are defined:
#
# +-------------------+------------------------------------------------+
# ! Name ! Description !
# +-------------------+------------------------------------------------+
# ! classes ! Number of classes being loaded. !
# ! compilation ! Time spent by the JVM compiling or optimizing. !
# ! garbage_collector ! Number of garbage collections and time spent. !
# ! memory ! Generic heap/nonheap memory usage. !
# ! memory_pool ! Memory usage by memory pool. !
# +-------------------+------------------------------------------------+
#
<Plugin "java">
LoadPlugin "org.collectd.java.GenericJMX"
<Plugin "GenericJMX">
################
# MBean blocks #
################
# Number of classes being loaded.
<MBean "classes">
ObjectName "java.lang:type=ClassLoading"
#InstancePrefix ""
#InstanceFrom ""
<Value>
Type "gauge"
InstancePrefix "loaded_classes"
#InstanceFrom ""
Table false
Attribute "LoadedClassCount"
</Value>
</MBean>
# Time spent by the JVM compiling or optimizing.
<MBean "compilation">
ObjectName "java.lang:type=Compilation"
#InstancePrefix ""
#InstanceFrom ""
<Value>
Type "total_time_in_ms"
InstancePrefix "compilation_time"
#InstanceFrom ""
Table false
Attribute "TotalCompilationTime"
</Value>
</MBean>
# Garbage collector information
<MBean "garbage_collector">
ObjectName "java.lang:type=GarbageCollector,*"
InstancePrefix "gc-"
InstanceFrom "name"
<Value>
Type "invocations"
#InstancePrefix ""
#InstanceFrom ""
Table false
Attribute "CollectionCount"
</Value>
<Value>
Type "total_time_in_ms"
InstancePrefix "collection_time"
#InstanceFrom ""
Table false
Attribute "CollectionTime"
</Value>
# # Not that useful, therefore commented out.
# <Value>
# Type "threads"
# #InstancePrefix ""
# #InstanceFrom ""
# Table false
# # Demonstration how to access composite types
# Attribute "LastGcInfo.GcThreadCount"
# </Value>
</MBean>
######################################
# Define the "jmx_memory" type as: #
# jmx_memory value:GAUGE:0:U #
# See types.db(5) for details. #
######################################
# Generic heap/nonheap memory usage.
<MBean "memory">
ObjectName "java.lang:type=Memory"
#InstanceFrom ""
InstancePrefix "memory"
# Creates four values: committed, init, max, used
<Value>
Type "jmx_memory"
#InstancePrefix ""
#InstanceFrom ""
Table true
Attribute "HeapMemoryUsage"
InstancePrefix "heap-"
</Value>
# Creates four values: committed, init, max, used
<Value>
Type "jmx_memory"
#InstancePrefix ""
#InstanceFrom ""
Table true
Attribute "NonHeapMemoryUsage"
InstancePrefix "nonheap-"
</Value>
</MBean>
# Memory usage by memory pool.
<MBean "memory_pool">
ObjectName "java.lang:type=MemoryPool,*"
InstancePrefix "memory_pool-"
InstanceFrom "name"
<Value>
Type "jmx_memory"
#InstancePrefix ""
#InstanceFrom ""
Table true
Attribute "Usage"
</Value>
</MBean>
### MBeans by Catalina / Tomcat ###
# The global request processor (summary for each request processor)
<MBean "catalina/global_request_processor">
ObjectName "Catalina:type=GlobalRequestProcessor,*"
InstancePrefix "request_processor-"
InstanceFrom "name"
<Value>
Type "io_octets"
InstancePrefix "global"
#InstanceFrom ""
Table false
Attribute "bytesReceived"
Attribute "bytesSent"
</Value>
<Value>
Type "total_requests"
InstancePrefix "global"
#InstanceFrom ""
Table false
Attribute "requestCount"
</Value>
<Value>
Type "total_time_in_ms"
InstancePrefix "global-processing"
#InstanceFrom ""
Table false
Attribute "processingTime"
</Value>
</MBean>
# Details for each request processor
<MBean "catalina/detailed_request_processor">
ObjectName "Catalina:type=RequestProcessor,*"
InstancePrefix "request_processor-"
InstanceFrom "worker"
<Value>
Type "io_octets"
#InstancePrefix ""
InstanceFrom "name"
Table false
Attribute "bytesReceived"
Attribute "bytesSent"
</Value>
<Value>
Type "total_requests"
#InstancePrefix ""
InstanceFrom "name"
Table false
Attribute "requestCount"
</Value>
<Value>
Type "total_time_in_ms"
InstancePrefix "processing-"
InstanceFrom "name"
Table false
Attribute "processingTime"
</Value>
</MBean>
# Thread pool
<MBean "catalina/thread_pool">
ObjectName "Catalina:type=ThreadPool,*"
InstancePrefix "request_processor-"
InstanceFrom "name"
<Value>
Type "threads"
InstancePrefix "total"
#InstanceFrom ""
Table false
Attribute "currentThreadCount"
</Value>
<Value>
Type "threads"
InstancePrefix "running"
#InstanceFrom ""
Table false
Attribute "currentThreadsBusy"
</Value>
</MBean>
#####################
# Connection blocks #
#####################
<Connection>
ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:17264/jmxrmi"
User "monitorRole"
Password "queeZie1"
Host "localhost"
Collect "classes"
Collect "compilation"
Collect "garbage_collector"
Collect "memory"
Collect "memory_pool"
</Connection>
</Plugin>
</Plugin>