# 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 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. ! # +-------------------+------------------------------------------------+ # LoadPlugin "org.collectd.java.GenericJMX" ################ # MBean blocks # ################ # Number of classes being loaded. ObjectName "java.lang:type=ClassLoading" #InstancePrefix "" #InstanceFrom "" Type "gauge" Table false Attribute "LoadedClassCount" InstancePrefix "loaded_classes" # Time spent by the JVM compiling or optimizing. ObjectName "java.lang:type=Compilation" #InstancePrefix "" #InstanceFrom "" Type "total_time_in_ms" Table false Attribute "TotalCompilationTime" InstancePrefix "compilation_time" # Garbage collector information # Plugin instance: InstancePrefix "gc-" InstanceFrom "name" ObjectName "java.lang:type=GarbageCollector,*" Type "invocations" Table false Attribute "CollectionCount" # Type instance: #InstancePrefix "" Type "total_time_in_ms" Table false Attribute "CollectionTime" # Type instance: InstancePrefix "collection_time" # # Not that useful, therefore commented out. # # Type "threads" # Table false # # Demonstration how to access composite types # Attribute "LastGcInfo.GcThreadCount" # # Type instance: # #InstancePrefix "" # # Generic heap/nonheap memory usage. ObjectName "java.lang:type=Memory" #InstanceFrom "" InstancePrefix "memory" # Creates four values: committed, init, max, used Type "memory" Table true Attribute "HeapMemoryUsage" # Type instance: InstancePrefix "heap-" # Creates four values: committed, init, max, used Type "memory" Table true Attribute "NonHeapMemoryUsage" # Type instance: InstancePrefix "nonheap-" # Memory usage by memory pool. ObjectName "java.lang:type=MemoryPool,*" InstancePrefix "memory_pool-" InstanceFrom "name" Type "memory" Table true Attribute "Usage" #InstancePrefix "" ##################### # Connection blocks # ##################### Host "localhost" ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:17264/jmxrmi" Collect "classes" Collect "compilation" Collect "garbage_collector" Collect "memory" Collect "memory_pool"