You can use this https://github.com/Stackdriver/jmxtrans-config-stackdriver/blob/master/jmxtrans/stackdriver/json-specify-instance/kafka.json as an example of how Mbean are named and how " is being escaped with \", and just use different output writer for any thing prior to 0.8.2.1 version. After 0.8.2.1, you will have to remove " and there are some changes type,name etc. Please Google search there is JMXTrans tools to auto generate JMX trans configuration from the runnning brokers.
Thanks, Bhavesh On Mon, Apr 20, 2015 at 1:57 PM, Daniel Compton < daniel.compton.li...@gmail.com> wrote: > Hi Naidu > > You'll need to escape the " with a \ in the Mbean names. I've run across > this too and it was al pain. It can get a bit tricky if you're doing it in > code because you need to account for double escapes and so forth. This is a > bug in the version of Metrics that Kafka is using. There is a JIRA ticket > to upgrade it somewhere, but I can't find it right now. > > Daniel. > On Tue, 21 Apr 2015 at 7:02 am Saladi Naidu <naidusp2...@yahoo.com.invalid > > > wrote: > > > We are planning to monitor health of our Kafka environment using JMX. I > > have looked at below links to find what is available via > > > > https://cwiki.apache.org/confluence/display/KAFKA/Available+Metrics > > https://cwiki.apache.org/confluence/display/KAFKA/JMX+Reporters > > > > why some of the kafka objects ("kafka.cluster", "kafka.consumer" etc are > > written with an additional " ? > > > > E.g > "kafka.server":type="BrokerTopicMetrics",name="AllTopicsBytesInPerSec" Vs > > the normal Mbeans are just something like this: > > > > java.lang:type=GarbageCollector,name=ConcurrentMarkSweep > > > > We are not successful in calling objects that have "" in their > > names. Naidu Saladi > > >