contrib/GenerixJMX.conf: Add some example configuration for Tomcat.
authorFlorian Forster <octo@noris.net>
Wed, 19 Aug 2009 15:15:08 +0000 (17:15 +0200)
committerFlorian Forster <octo@noris.net>
Wed, 19 Aug 2009 15:15:08 +0000 (17:15 +0200)
Currently configured for tomcat are:

 * Received / sent octets for each request processor.
 * Number of requests.
 * Time spent processing queries.
 * Number of total/busy threads.

The first three values are available as a summary for a request processor
as well as detailed (for each thread).

This configuration is yet untested and may contain obvious typos!

contrib/GenericJMX.conf
src/types.db

index 61a44b0..45c7cf9 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,*"
 
       <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>
 
       # Creates four values: committed, init, max, used
       <Value>
         Type "memory"
+        #InstancePrefix ""
+        #InstanceFrom ""
         Table true
         Attribute "HeapMemoryUsage"
-        # Type instance:
         InstancePrefix "heap-"
       </Value>
 
       # Creates four values: committed, init, max, used
       <Value>
         Type "memory"
+        #InstancePrefix ""
+        #InstanceFrom ""
         Table true
         Attribute "NonHeapMemoryUsage"
-        # Type instance:
-        InstancePrefix "nonheap-"
       </Value>
     </MBean>
 
 
       <Value>
         Type "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 ""
+        #InstanceFrom ""
+        Table false
+        Attribute "bytesReceived"
+        Attribute "bytesSent"
+      </Value>
+
+      <Value>
+        Type "total_requests"
+        #InstancePrefix ""
+        #InstanceFrom ""
+        Table false
+        Attribute "requestCount"
+      </Value>
+
+      <Value>
+        Type "total_time_in_ms"
+        InstancePrefix "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 "name"
+
+      <Value>
+        Type "io_octets"
+        #InstancePrefix ""
+        InstanceFrom "worker"
+        Table false
+        Attribute "bytesReceived"
+        Attribute "bytesSent"
+      </Value>
+
+      <Value>
+        Type "total_requests"
+        #InstancePrefix ""
+        InstanceFrom "worker"
+        Table false
+        Attribute "requestCount"
+      </Value>
+
+      <Value>
+        Type "total_time_in_ms"
+        InstancePrefix "processing-"
+        InstanceFrom "worker"
+        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>
 
index dd37cc1..0f81a5f 100644 (file)
@@ -61,6 +61,7 @@ if_octets             rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295
 if_packets             rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295
 if_rx_errors           value:COUNTER:0:4294967295
 if_tx_errors           value:COUNTER:0:4294967295
+invocations            value:DERIVE:0:U
 io_octets              rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295
 io_packets             rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295
 ipt_bytes              value:COUNTER:0:134217728
@@ -123,9 +124,12 @@ swap                       value:GAUGE:0:1099511627776
 swap_io                        value:DERIVE:0:1099511627776
 tcp_connections                value:GAUGE:0:4294967295
 temperature            value:GAUGE:-273.15:U
+threads                        value:GAUGE:0:U
 time_dispersion                seconds:GAUGE:-1000000:1000000
 timeleft               timeleft:GAUGE:0:3600
 time_offset            seconds:GAUGE:-1000000:1000000
+total_requests         value:DERIVE:0:U
+total_time_in_ms       value:DERIVE:0:U
 uptime                 value:GAUGE:0:4294967295
 users                  users:GAUGE:0:65535
 virt_cpu_total         ns:COUNTER:0:256000000000