Unless you are on 0.8.1, your JMX query object name should be 'kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec'
By default the above name should give you an all-topics count, but you can also request it per-topic by using "topic=", for ex.: 'kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec,topic=myname' The "AllTopics" prefixes in the metric names were changed away via KAFKA-1481. See the new monitoring table for 0.8.2 and above: https://kafka.apache.org/documentation.html#monitoring On Wed, 20 Apr 2016 at 00:24 Sam Mudg <sammudg...@gmail.com> wrote: > Hi, > > I enabled imx on kafka brokers by adding > KAFKA_JMX_OPTS= KAFKA_JMX_OPTS=" > -Dcom.sun.management.jmxremote=true > -Dcom.sun.management.jmxremote.authenticate=false > -Dcom.sun.management.jmxremote.ssl=false > -Djava.rmi.server.hostname=<server_IP> > -Djava.net.preferIPv4Stack=true “ > However, when I use ‘kafka.tools.JmxTool’ to get the metrics, it outputs > unix time stamps which is not the expected behavior. > > Eg: sh /usr/local/kafka/bin/kafka-run-class.sh kafka.tools.JmxTool > --object-name > 'kafka.server:type=BrokerTopicMetrics,name=AllTopicsMessagesInPerSec' > --jmx-url service:jmx:rmi:///jndi/rmi://<server_IP>:9111/jmxrmi > The above command prints out unix time stamps. How can I fix this and have > it print out the metrics? > > Thank you. >