0

I use kafka_2.11-0.9.0.1, I try two version of jason config files. I can get JVM info like heapmem and GC enter image description here

But when I wanted to get kafka metrics, there is nothing out. This is the jmxtrans log. enter image description here

And more, This is two version jason file I user:

   {
  "servers" : [ {
   "port" : "9999",
   "host" : "localhost",
   "queries" : [ {
    "outputWriters" : [ {
    "@class" : "com.googlecode.jmxtrans.model.output.StdOutWriter",
    "settings" : {
    }
  } ],
  "obj" : "kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec,topic=test",
  "attr" : [ "Count"]
},{

    "outputWriters" : [ {
    "@class" : "com.googlecode.jmxtrans.model.output.StdOutWriter",
    "settings" : {
    }
  } ],
  "obj" : "kafka.server:type=BrokerTopicMetrics,name=*",
      "resultAlias": "Kafka",
  "attr" : [ "Count","OneMinuteRate"]
}



 ],
"numQueryThreads" : 2

} ] }

the other is :

{
      "outputWriters" : [ {
    "@class" : "com.googlecode.jmxtrans.model.output.KeyOutWriter",
    "settings" : {
            "outputFile" : "testowo-counts3.txt",
      "maxLogFileSize" : "10MB",
      "maxLogBackupFiles" : 200,
      "delimiter" : "\t",
      "debug" : true

    }
  } ],

            "obj": "\"kafka.network\":type=\"RequestMetrics\",name=\"Produce-RequestsPerSec\"",
            "resultAlias": "produce",
            "attr": [
                "Count",
                "OneMinuteRate"
            ]

    } ,{
    "outputWriters" : [ {
    "@class" : "com.googlecode.jmxtrans.model.output.KeyOutWriter",
    "settings" : {
            "outputFile" : "testowo-gc.txt",
      "maxLogFileSize" : "10MB",
      "maxLogBackupFiles" : 200,
      "delimiter" : "\t",
      "debug" : true

    }
  } ],

  "obj": "java.lang:type=GarbageCollector,name=*",
            "resultAlias": "GC",
            "attr": [
                "CollectionCount",
                "CollectionTime"
            ]
    }
leo
  • 51
  • 3

1 Answers1

0

This is the version problem. I recommend jconsole to see the Mbeans tree. It helps a lot.

leo
  • 51
  • 3