Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/72097
Change subject: Add metrics that can be applied to most JVMs. ...................................................................... Add metrics that can be applied to most JVMs. A few of the sections won't apply to all JVMs but jmxtrans will see that there is nothing there for it and continue without complaint. Change-Id: I68f92933557ee4c8bd5c7478d70f8820b4aa26f5 --- A manifests/metrics/jvm.pp 1 file changed, 75 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/jmxtrans refs/changes/97/72097/1 diff --git a/manifests/metrics/jvm.pp b/manifests/metrics/jvm.pp new file mode 100644 index 0000000..fe935d5 --- /dev/null +++ b/manifests/metrics/jvm.pp @@ -0,0 +1,75 @@ +# == Define jmxtrans::metrics::jvm +# +# Sets up this JVM to be monitored by a jmxtrans node. +# Note that at present this only really does the right thing with CMS and +# Parallel GC. +# +# == Parameters +# $title - host:port of JMX to query (required) +define jmxtrans::metrics::jvm() { + @@jmxtrans::metrics { "${title}-jvm-metrics": + jmx => "$title", + ganglia_group_name => 'jvm memory', + objects => [ + { + 'name' => 'java.lang:type=Memory', + 'resultAlias' => 'Memory', + 'attrs' => { + 'HeapMemoryUsage' => {'units' => 'bytes', 'slope' => 'both'}, + 'NonHeapMemoryUsage' => {'units' => 'bytes', 'slope' => 'both'}, + } + }, + # Parallel GC + { + 'name' => 'java.lang:name=PS Scavenge,type=GarbageCollector', + 'resultAlias' => 'Incremental GC', + 'attrs' => { + 'CollectionCount' => {'units' => 'GCs', 'slope' => 'both'}, + 'CollectionTime' => {'units' => 'milliseconds', 'slope' => 'positive'}, + } + }, + { + 'name' => 'java.lang:name=PS MarkSweep,type=GarbageCollector', + 'resultAlias' => 'Full GC', + 'attrs' => { + 'CollectionCount' => {'units' => 'GCs', 'slope' => 'both'}, + 'CollectionTime' => {'units' => 'milliseconds', 'slope' => 'positive'}, + } + }, + # CMS GC + { + 'name' => 'java.lang:name=ParNew,type=GarbageCollector', + 'resultAlias' => 'Incremental GC', + 'attrs' => { + 'CollectionCount' => {'units' => 'GCs', 'slope' => 'both'}, + 'CollectionTime' => {'units' => 'milliseconds', 'slope' => 'positive'}, + } + }, + { + 'name' => 'java.lang:name=ConcurrentMarkSweep,type=GarbageCollector', + 'resultAlias' => 'Full GC', + 'attrs' => { + 'CollectionCount' => {'units' => 'GCs', 'slope' => 'both'}, + 'CollectionTime' => {'units' => 'milliseconds', 'slope' => 'positive'}, + } + }, + # These only show up for Java 7 + { + 'name' => 'java.nio:name=mapped,type=BufferPool', + 'resultAlias' => 'Mapped Buffer Pool', + 'attrs' => { + 'MemoryUsed' => {'units' => 'bytes', 'slope' => 'both'}, + 'Count' => {'units' => 'buffers', 'slope' => 'both'}, + } + }, + { + 'name' => 'java.nio:name=direct,type=BufferPool', + 'resultAlias' => 'Direct Buffer Pool', + 'attrs' => { + 'MemoryUsed' => {'units' => 'bytes', 'slope' => 'both'}, + 'Count' => {'units' => 'buffers', 'slope' => 'both'}, + } + } + ] + } +} -- To view, visit https://gerrit.wikimedia.org/r/72097 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68f92933557ee4c8bd5c7478d70f8820b4aa26f5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/jmxtrans Gerrit-Branch: master Gerrit-Owner: Manybubbles <never...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits