Skip to content

Instantly share code, notes, and snippets.

@SaschaMoellering
Created December 9, 2013 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SaschaMoellering/7870135 to your computer and use it in GitHub Desktop.
Save SaschaMoellering/7870135 to your computer and use it in GitHub Desktop.
Chef-template for Vert.x-Jmxtrans configuration
{
"servers" : [ {
"alias" : "<%= @node[:hostname] %>",
"host" : "<%= @node[:hostname] %>",
"port" : "<%= @jmx_port %>",
"username" : "<%= @jmx_user %>",
"password" : "<%= @jmx_password %>",
"queries" : [
{
"obj" : "java.lang:type=Memory",
"attr" : [ "HeapMemoryUsage", "NonHeapMemoryUsage" ],
"resultAlias" : "jvm.heap",
"outputWriters" : [ {
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
"settings" : {
"host" : "<%= @graphite_host %>",
"port" : "<%= @graphite_port %>"
}
} ]
}, {
"obj" : "java.lang:name=PS Perm Gen,type=MemoryPool",
"attr" : [ "Usage" ],
"resultAlias" : "jvm.permgenspace",
"outputWriters" : [ {
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
"settings" : {
"host" : "<%= @graphite_host %>",
"port" : "<%= @graphite_port %>"
}
} ]
}, {
"obj" : "java.lang:type=GarbageCollector,name=*",
"attr" : [ "CollectionCount", "CollectionTime" ],
"resultAlias" : "jvm.gc",
"outputWriters" : [ {
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
"settings" : {
"host" : "<%= @graphite_host %>",
"port" : "<%= @graphite_port %>"
}
} ]
}, {
"obj" : "java.lang:type=Threading",
"resultAlias" : "jvm.threads",
"attr" : [ "DaemonThreadCount", "ThreadCount" ],
"outputWriters" : [ {
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
"settings" : {
"host" : "<%= @graphite_host %>",
"port" : "<%= @graphite_port %>"
}
} ]
}, {
"obj" : "org.vertx.ThreadPool:type=Worker",
"resultAlias" : "vertx.worker",
"attr" : [ "ActiveCount", "CompletedTaskCount", "TaskCount", "QueueSize" ],
"outputWriters" : [ {
"@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
"settings" : {
"host" : "<%= @graphite_host %>",
"port" : "<%= @graphite_port %>"
}
} ]
}
],
"numQueryThreads": "2"
} ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment