bugcy013
6/20/2014 - 12:20 AM

Jmxtrans.json

{
  "servers" : [ {
    "alias" : "<%= @node[:hostname] %>",
    "host" : "<%= @node[:hostname] %>",
    "port" : "<%= @jmx_port %>",
    "username" : "<%= @jmx_user %>",
    "password" : "<%= @jmx_password %>",
    "queries" : [ 
    {
        "obj" : "java.lang:type=OperatingSystem",
        "attr" : [ "SystemLoadAverage" ],
        "resultAlias" : "jvm.cpu",
        "outputWriters" : [ { 
          "@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
          "settings" : { 
            "host" : "l-mon-02.zanox-live.de",
            "port" : "2013"
          }   
        } ] 
      }, {
        "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" : "\"kafka.server\":type=\"BrokerTopicMetrics\",name=\"AllTopicsMessagesInPerSec\"", 
        "resultAlias" : "kafka.server.BrokerTopicMetrics.AllTopicsMessagesInPerSec",
        "attr" : [ "OneMinuteRate", "MeanRate", "Count" ],
        "outputWriters" : [ { 
          "@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
          "settings" : { 
            "host" : "<%= @graphite_host %>",
            "port" : "<%= @graphite_port %>"
          }   
        } ]
      }, {   
        "obj" : "\"kafka.server\":type=\"BrokerTopicMetrics\",name=\"AllTopicsBytesOutPerSec\"", 
        "resultAlias" : "kafka.server.BrokerTopicMetrics.AllTopicsBytesOutPerSec",
        "attr" : [ "OneMinuteRate", "MeanRate", "Count" ],
        "outputWriters" : [ { 
          "@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
          "settings" : { 
            "host" : "<%= @graphite_host %>",
            "port" : "<%= @graphite_port %>"
          }   
        } ]
      }, {   
        "obj" : "\"kafka.server\":type=\"BrokerTopicMetrics\",name=\"AllTopicsFailedFetchRequestsPerSec\"", 
        "resultAlias" : "kafka.server.BrokerTopicMetrics.AllTopicsFailedFetchRequestsPerSec",
        "attr" : [ "OneMinuteRate", "MeanRate", "Count" ],
        "outputWriters" : [ { 
          "@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
          "settings" : { 
            "host" : "<%= @graphite_host %>",
            "port" : "<%= @graphite_port %>"
          }   
        } ]
      }, {   
        "obj" : "\"kafka.server\":type=\"BrokerTopicMetrics\",name=\"AllTopicsFailedProduceRequestsPerSec\"", 
        "resultAlias" : "kafka.server.BrokerTopicMetrics.AllTopicsFailedProduceRequestsPerSec",
        "attr" : [ "OneMinuteRate", "MeanRate", "Count" ],
        "outputWriters" : [ { 
          "@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
          "settings" : { 
            "host" : "<%= @graphite_host %>",
            "port" : "<%= @graphite_port %>"
          }   
        } ]
      }   
    ],
    "numQueryThreads": "2"
  } ] 
}