# This is the monitoring configuration for standalone JVMs. # Look for JMX_HOST and JMX_PORT to adjust your configuration file. # Replace JMX_PORT below with the value configured in your JVM deployment. LoadPlugin java JVMARG "-Djava.class.path=/opt/stackdriver/collectd/share/collectd/java/collectd-api.jar:/opt/stackdriver/collectd/share/collectd/java/generic-jmx.jar" LoadPlugin "org.collectd.java.GenericJMX" ObjectName "java.lang:type=Threading" Type "gauge" InstancePrefix "threading-daemon_thread_count" Table false Attribute "DaemonThreadCount" Type "gauge" InstancePrefix "threading-thread_count" Table false Attribute "ThreadCount" Type "gauge" InstancePrefix "threading-peak_thread_count" Table false Attribute "PeakThreadCount" ObjectName "java.lang:type=Memory" Type "memory" InstancePrefix "memory-heap_usage_committed" Table false Attribute "HeapMemoryUsage.committed" Type "memory" InstancePrefix "memory-non_heap_usage_committed" Table false Attribute "NonHeapMemoryUsage.committed" Type "memory" InstancePrefix "memory-heap_usage_used" Table false Attribute "HeapMemoryUsage.used" Type "memory" InstancePrefix "memory-non_heap_usage_used" Table false Attribute "NonHeapMemoryUsage.used" Type "memory" InstancePrefix "memory-heap_usage_max" Table false Attribute "HeapMemoryUsage.max" Type "memory" InstancePrefix "memory-non_heap_usage_max" Table false Attribute "NonHeapMemoryUsage.max" ObjectName "java.lang:type=Runtime" Type "counter" InstancePrefix "runtime-uptime" Table false Attribute "Uptime" ObjectName "java.lang:type=OperatingSystem" Type "gauge" InstancePrefix "os-open_fd_count" Table false Attribute "OpenFileDescriptorCount" Type "counter" InstancePrefix "os-process_cpu_time" Table false Attribute "ProcessCpuTime" ObjectName "java.lang:type=GarbageCollector,name=*" InstanceFrom "name" Type "counter" InstancePrefix "gc-collection_count" Table false Attribute "CollectionCount" Type "counter" InstancePrefix "gc-collection_time" Table false Attribute "CollectionTime" # When using non-standard JVM configurations, replace the below with #ServiceURL "service:jmx:rmi:///jndi/rmi://JMX_HOST:JMX_PORT/jmxrmi" ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:JMX_PORT/jmxrmi" InstancePrefix "jvm" Collect "jvm_localhost_Threading" Collect "jvm_localhost_Memory" Collect "jvm_localhost_Runtime" Collect "jvm_localhost_os" Collect "jvm_localhost_gc" LoadPlugin match_regex LoadPlugin target_set LoadPlugin target_replace Plugin "^GenericJMX$" PluginInstance "^jvm.*$" PluginInstance "jvm" "" Plugin "jvm" Target "return" Chain "GenericJMX_jvm" PreCacheChain "PreCache"