Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # user >> Kafka Metrics in 0.8


Copy link to this message
-
Kafka Metrics in 0.8
Hi

I am getting various kafka parameters (like NumFetchRequests,
FetchRequestsPerSecond, ProduceRequestsPerSecond etc.) through JMX in case
of kafka-0.7.

In kafka-0.8 i am doing the same but not able to get parameters.

There are some changes in reporting metrics in kafka-0.8 as compared to
kafka-0.7. I have already noticed that. According to changes in kafka-0.8 i
am trying to get kafka metrics using JMX through jmxtrans api.

Here is sample java code of getting jmx parameters using jmxtrans api:

       Server kafkaJMXServer = new Server("127.0.0.1", "9999");
        Query query1 = new Query();

query1.setObj("kafka.server:type=BrokerTopicMetrics,name=AllTopicsBytesInPerSec");
        query1.addAttr("MeanRate");
        kafkaJMXServer.addQuery(query1);
        JmxProcess process = new JmxProcess(kafkaJMXServer);
        JmxUtils.execute(process);
        System.out.println(query1.getResults());

Please let me know what i am missing?

--
*Thanks & Regards*
*Hanish Bansal*

 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB