1 # contrib/GenericJMX.conf
2 # -----------------------
4 # This is an example config file for the ‘GenericJMX’ plugin, a plugin written
5 # in Java to receive values via the “Java Management Extensions” (JMX). The
6 # plugin can be found in the
7 # bindings/java/org/collectd/java/
8 # directory of the source distribution.
10 # This sample config defines a couple of <MBean /> blocks which query MBeans
11 # provided by the JVM itself, i. e. which should be available for all Java
12 # processes. The following MBean blocks are defined:
14 # +-------------------+------------------------------------------------+
15 # ! Name ! Description !
16 # +-------------------+------------------------------------------------+
17 # ! classes ! Number of classes being loaded. !
18 # ! compilation ! Time spent by the JVM compiling or optimizing. !
19 # ! garbage_collector ! Number of garbage collections and time spent. !
20 # ! memory ! Generic heap/nonheap memory usage. !
21 # ! memory_pool ! Memory usage by memory pool. !
22 # +-------------------+------------------------------------------------+
25 LoadPlugin "org.collectd.java.GenericJMX"
31 # Number of classes being loaded.
33 ObjectName "java.lang:type=ClassLoading"
39 InstancePrefix "loaded_classes"
42 Attribute "LoadedClassCount"
46 # Time spent by the JVM compiling or optimizing.
48 ObjectName "java.lang:type=Compilation"
53 Type "total_time_in_ms"
54 InstancePrefix "compilation_time"
57 Attribute "TotalCompilationTime"
61 # Garbage collector information
62 <MBean "garbage_collector">
63 ObjectName "java.lang:type=GarbageCollector,*"
72 Attribute "CollectionCount"
76 Type "total_time_in_ms"
77 InstancePrefix "collection_time"
80 Attribute "CollectionTime"
83 # # Not that useful, therefore commented out.
89 # # Demonstration how to access composite types
90 # Attribute "LastGcInfo.GcThreadCount"
94 # Generic heap/nonheap memory usage.
96 ObjectName "java.lang:type=Memory"
98 InstancePrefix "memory"
100 # Creates four values: committed, init, max, used
106 Attribute "HeapMemoryUsage"
107 InstancePrefix "heap-"
110 # Creates four values: committed, init, max, used
116 Attribute "NonHeapMemoryUsage"
120 # Memory usage by memory pool.
121 <MBean "memory_pool">
122 ObjectName "java.lang:type=MemoryPool,*"
123 InstancePrefix "memory_pool-"
135 ### MBeans by Catalina / Tomcat ###
136 # The global request processor (summary for each request processor)
137 <MBean "catalina/global_request_processor">
138 ObjectName "Catalina:type=GlobalRequestProcessor,*"
139 InstancePrefix "request_processor-"
144 InstancePrefix "global"
147 Attribute "bytesReceived"
148 Attribute "bytesSent"
152 Type "total_requests"
153 InstancePrefix "global"
156 Attribute "requestCount"
160 Type "total_time_in_ms"
161 InstancePrefix "global-processing"
164 Attribute "processingTime"
168 # Details for each request processor
169 <MBean "catalina/detailed_request_processor">
170 ObjectName "Catalina:type=RequestProcessor,*"
171 InstancePrefix "request_processor-"
172 InstanceFrom "worker"
179 Attribute "bytesReceived"
180 Attribute "bytesSent"
184 Type "total_requests"
188 Attribute "requestCount"
192 Type "total_time_in_ms"
193 InstancePrefix "processing-"
196 Attribute "processingTime"
201 <MBean "catalina/thread_pool">
202 ObjectName "Catalina:type=ThreadPool,*"
203 InstancePrefix "request_processor-"
208 InstancePrefix "total"
211 Attribute "currentThreadCount"
216 InstancePrefix "running"
219 Attribute "currentThreadsBusy"
223 #####################
224 # Connection blocks #
225 #####################
227 ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:17264/jmxrmi"
232 Collect "compilation"
233 Collect "garbage_collector"
235 Collect "memory_pool"