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 >