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"
40 Attribute "LoadedClassCount"
41 InstancePrefix "loaded_classes"
45 # Time spent by the JVM compiling or optimizing.
47 ObjectName "java.lang:type=Compilation"
52 Type "total_time_in_ms"
54 Attribute "TotalCompilationTime"
55 InstancePrefix "compilation_time"
59 # Garbage collector information
60 <MBean "garbage_collector">
64 ObjectName "java.lang:type=GarbageCollector,name=*"
69 Attribute "CollectionCount"
75 Type "total_time_in_ms"
77 Attribute "CollectionTime"
79 InstancePrefix "collection_time"
82 # # Not that useful, therefore commented out.
86 # # Demonstration how to access composite types
87 # Attribute "LastGcInfo.GcThreadCount"
93 # Generic heap/nonheap memory usage.
95 ObjectName "java.lang:type=Memory"
97 InstancePrefix "memory"
99 # Creates four values: committed, init, max, used
103 Attribute "HeapMemoryUsage"
105 InstancePrefix "heap-"
108 # Creates four values: committed, init, max, used
112 Attribute "NonHeapMemoryUsage"
114 InstancePrefix "nonheap-"
118 # Memory usage by memory pool.
119 <MBean "memory_pool">
120 ObjectName "java.lang:type=MemoryPool,name=*"
121 InstancePrefix "memory_pool-"
132 #####################
133 # Connection blocks #
134 #####################
137 ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:17264/jmxrmi"
139 Collect "compilation"
140 Collect "garbage_collector"
142 Collect "memory_pool"