Merge pull request #3339 from jkohen/patch-1
[collectd.git] / contrib / GenericJMX.conf
index b88d1a6..1d3fe56 100644 (file)
 
       <Value>
         Type "gauge"
+        InstancePrefix "loaded_classes"
+        #InstanceFrom ""
         Table false
         Attribute "LoadedClassCount"
-        InstancePrefix "loaded_classes"
       </Value>
     </MBean>
 
 
       <Value>
         Type "total_time_in_ms"
+        InstancePrefix "compilation_time"
+        #InstanceFrom ""
         Table false
         Attribute "TotalCompilationTime"
-        InstancePrefix "compilation_time"
       </Value>
     </MBean>
 
     # Garbage collector information
     <MBean "garbage_collector">
-      # Plugin instance:
+      ObjectName "java.lang:type=GarbageCollector,*"
       InstancePrefix "gc-"
       InstanceFrom "name"
-      ObjectName "java.lang:type=GarbageCollector,name=*"
 
       <Value>
         Type "invocations"
+        #InstancePrefix ""
+        #InstanceFrom ""
         Table false
         Attribute "CollectionCount"
-        # Type instance:
-        #InstancePrefix ""
       </Value>
 
       <Value>
         Type "total_time_in_ms"
+        InstancePrefix "collection_time"
+        #InstanceFrom ""
         Table false
         Attribute "CollectionTime"
-        # Type instance:
-        InstancePrefix "collection_time"
       </Value>
 
 #      # Not that useful, therefore commented out.
 #      <Value>
 #        Type "threads"
+#        #InstancePrefix ""
+#        #InstanceFrom ""
 #        Table false
 #        # Demonstration how to access composite types
 #        Attribute "LastGcInfo.GcThreadCount"
-#        # Type instance:
-#        #InstancePrefix ""
 #      </Value>
     </MBean>
 
+    ######################################
+    # Define the "jmx_memory" type as:   #
+    #   jmx_memory  value:GAUGE:0:U      #
+    # See types.db(5) for details.       #
+    ######################################
+
     # Generic heap/nonheap memory usage.
     <MBean "memory">
       ObjectName "java.lang:type=Memory"
 
       # Creates four values: committed, init, max, used
       <Value>
-        Type "memory"
+        Type "jmx_memory"
+        #InstancePrefix ""
+        #InstanceFrom ""
         Table true
         Attribute "HeapMemoryUsage"
-        # Type instance:
         InstancePrefix "heap-"
       </Value>
 
       # Creates four values: committed, init, max, used
       <Value>
-        Type "memory"
+        Type "jmx_memory"
+        #InstancePrefix ""
+        #InstanceFrom ""
         Table true
         Attribute "NonHeapMemoryUsage"
-        # Type instance:
         InstancePrefix "nonheap-"
       </Value>
     </MBean>
 
     # Memory usage by memory pool.
     <MBean "memory_pool">
-      ObjectName "java.lang:type=MemoryPool,name=*"
+      ObjectName "java.lang:type=MemoryPool,*"
       InstancePrefix "memory_pool-"
       InstanceFrom "name"
 
       <Value>
-        Type "memory"
+        Type "jmx_memory"
+        #InstancePrefix ""
+        #InstanceFrom ""
         Table true
         Attribute "Usage"
+      </Value>
+    </MBean>
+
+    ### MBeans by Catalina / Tomcat ###
+    # The global request processor (summary for each request processor)
+    <MBean "catalina/global_request_processor">
+      ObjectName "Catalina:type=GlobalRequestProcessor,*"
+      InstancePrefix "request_processor-"
+      InstanceFrom "name"
+
+      <Value>
+        Type "io_octets"
+        InstancePrefix "global"
+        #InstanceFrom ""
+        Table false
+        Attribute "bytesReceived"
+        Attribute "bytesSent"
+      </Value>
+
+      <Value>
+        Type "total_requests"
+        InstancePrefix "global"
+        #InstanceFrom ""
+        Table false
+        Attribute "requestCount"
+      </Value>
+
+      <Value>
+        Type "total_time_in_ms"
+        InstancePrefix "global-processing"
+        #InstanceFrom ""
+        Table false
+        Attribute "processingTime"
+      </Value>
+    </MBean>
+
+    # Details for each  request processor
+    <MBean "catalina/detailed_request_processor">
+      ObjectName "Catalina:type=RequestProcessor,*"
+      InstancePrefix "request_processor-"
+      InstanceFrom "worker"
+
+      <Value>
+        Type "io_octets"
         #InstancePrefix ""
+        InstanceFrom "name"
+        Table false
+        Attribute "bytesReceived"
+        Attribute "bytesSent"
+      </Value>
+
+      <Value>
+        Type "total_requests"
+        #InstancePrefix ""
+        InstanceFrom "name"
+        Table false
+        Attribute "requestCount"
+      </Value>
+
+      <Value>
+        Type "total_time_in_ms"
+        InstancePrefix "processing-"
+        InstanceFrom "name"
+        Table false
+        Attribute "processingTime"
+      </Value>
+    </MBean>
+
+    # Thread pool
+    <MBean "catalina/thread_pool">
+      ObjectName "Catalina:type=ThreadPool,*"
+      InstancePrefix "request_processor-"
+      InstanceFrom "name"
+
+      <Value>
+        Type "threads"
+        InstancePrefix "total"
+        #InstanceFrom ""
+        Table false
+        Attribute "currentThreadCount"
+      </Value>
+
+      <Value>
+        Type "threads"
+        InstancePrefix "running"
+        #InstanceFrom ""
+        Table false
+        Attribute "currentThreadsBusy"
       </Value>
     </MBean>
 
     # Connection blocks #
     #####################
     <Connection>
-      Host "localhost"
       ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:17264/jmxrmi"
+      User "monitorRole"
+      Password "queeZie1"
+      Host "localhost"
       Collect "classes"
       Collect "compilation"
       Collect "garbage_collector"