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 ######################################
95 # Define the "jmx_memory" type as: #
96 # jmx_memory value:GAUGE:0:U #
97 # See types.db(5) for details. #
98 ######################################
100 # Generic heap/nonheap memory usage.
102 ObjectName "java.lang:type=Memory"
104 InstancePrefix "memory"
106 # Creates four values: committed, init, max, used
112 Attribute "HeapMemoryUsage"
113 InstancePrefix "heap-"
116 # Creates four values: committed, init, max, used
122 Attribute "NonHeapMemoryUsage"
123 InstancePrefix "nonheap-"
127 # Memory usage by memory pool.
128 <MBean "memory_pool">
129 ObjectName "java.lang:type=MemoryPool,*"
130 InstancePrefix "memory_pool-"
142 ### MBeans by Catalina / Tomcat ###
143 # The global request processor (summary for each request processor)
144 <MBean "catalina/global_request_processor">
145 ObjectName "Catalina:type=GlobalRequestProcessor,*"
146 InstancePrefix "request_processor-"
151 InstancePrefix "global"
154 Attribute "bytesReceived"
155 Attribute "bytesSent"
159 Type "total_requests"
160 InstancePrefix "global"
163 Attribute "requestCount"
167 Type "total_time_in_ms"
168 InstancePrefix "global-processing"
171 Attribute "processingTime"
175 # Details for each request processor
176 <MBean "catalina/detailed_request_processor">
177 ObjectName "Catalina:type=RequestProcessor,*"
178 InstancePrefix "request_processor-"
179 InstanceFrom "worker"
186 Attribute "bytesReceived"
187 Attribute "bytesSent"
191 Type "total_requests"
195 Attribute "requestCount"
199 Type "total_time_in_ms"
200 InstancePrefix "processing-"
203 Attribute "processingTime"
208 <MBean "catalina/thread_pool">
209 ObjectName "Catalina:type=ThreadPool,*"
210 InstancePrefix "request_processor-"
215 InstancePrefix "total"
218 Attribute "currentThreadCount"
223 InstancePrefix "running"
226 Attribute "currentThreadsBusy"
230 #####################
231 # Connection blocks #
232 #####################
234 ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:17264/jmxrmi"
239 Collect "compilation"
240 Collect "garbage_collector"
242 Collect "memory_pool"