# 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" InstancePrefix "loaded_classes" #InstanceFrom "" Table false Attribute "LoadedClassCount" # Time spent by the JVM compiling or optimizing. ObjectName "java.lang:type=Compilation" #InstancePrefix "" #InstanceFrom "" Type "total_time_in_ms" InstancePrefix "compilation_time" #InstanceFrom "" Table false Attribute "TotalCompilationTime" # Garbage collector information ObjectName "java.lang:type=GarbageCollector,*" InstancePrefix "gc-" InstanceFrom "name" Type "invocations" #InstancePrefix "" #InstanceFrom "" Table false Attribute "CollectionCount" Type "total_time_in_ms" InstancePrefix "collection_time" #InstanceFrom "" Table false Attribute "CollectionTime" # # Not that useful, therefore commented out. # # Type "threads" # #InstancePrefix "" # #InstanceFrom "" # Table false # # Demonstration how to access composite types # Attribute "LastGcInfo.GcThreadCount" # ###################################### # Define the "jmx_memory" type as: # # jmx_memory value:GAUGE:0:U # # See types.db(5) for details. # ###################################### # Generic heap/nonheap memory usage. ObjectName "java.lang:type=Memory" #InstanceFrom "" InstancePrefix "memory" # Creates four values: committed, init, max, used Type "jmx_memory" #InstancePrefix "" #InstanceFrom "" Table true Attribute "HeapMemoryUsage" InstancePrefix "heap-" # Creates four values: committed, init, max, used Type "jmx_memory" #InstancePrefix "" #InstanceFrom "" Table true Attribute "NonHeapMemoryUsage" InstancePrefix "nonheap-" # Memory usage by memory pool. ObjectName "java.lang:type=MemoryPool,*" InstancePrefix "memory_pool-" InstanceFrom "name" Type "jmx_memory" #InstancePrefix "" #InstanceFrom "" Table true Attribute "Usage" ### MBeans by Catalina / Tomcat ### # The global request processor (summary for each request processor) ObjectName "Catalina:type=GlobalRequestProcessor,*" InstancePrefix "request_processor-" InstanceFrom "name" Type "io_octets" InstancePrefix "global" #InstanceFrom "" Table false Attribute "bytesReceived" Attribute "bytesSent" Type "total_requests" InstancePrefix "global" #InstanceFrom "" Table false Attribute "requestCount" Type "total_time_in_ms" InstancePrefix "global-processing" #InstanceFrom "" Table false Attribute "processingTime" # Details for each request processor ObjectName "Catalina:type=RequestProcessor,*" InstancePrefix "request_processor-" InstanceFrom "worker" Type "io_octets" #InstancePrefix "" InstanceFrom "name" Table false Attribute "bytesReceived" Attribute "bytesSent" Type "total_requests" #InstancePrefix "" InstanceFrom "name" Table false Attribute "requestCount" Type "total_time_in_ms" InstancePrefix "processing-" InstanceFrom "name" Table false Attribute "processingTime" # Thread pool ObjectName "Catalina:type=ThreadPool,*" InstancePrefix "request_processor-" InstanceFrom "name" Type "threads" InstancePrefix "total" #InstanceFrom "" Table false Attribute "currentThreadCount" Type "threads" InstancePrefix "running" #InstanceFrom "" Table false Attribute "currentThreadsBusy" ##################### # Connection blocks # ##################### 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"