Merge pull request #3339 from jkohen/patch-1
[collectd.git] / contrib / GenericJMX.conf
index 394dd30..1d3fe56 100644 (file)
 #      </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
 
       # Creates four values: committed, init, max, used
       <Value>
-        Type "memory"
+        Type "jmx_memory"
         #InstancePrefix ""
         #InstanceFrom ""
         Table true
         Attribute "NonHeapMemoryUsage"
+        InstancePrefix "nonheap-"
       </Value>
     </MBean>
 
       InstanceFrom "name"
 
       <Value>
-        Type "memory"
+        Type "jmx_memory"
         #InstancePrefix ""
         #InstanceFrom ""
         Table true
     # 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"