javajmxmbeans

MBean nested object name in JMX


I've noticed that some MBeans have nested keys; how do I make the query to get that key?

The image below shows an example:

enter image description here

Normally, the MBean query is like this: "org.apache.cassandra.metrics:type=CQL,name=RegularStatementsExecuted"

How do I add the additional folder to that query? I've tried the following:

"org.apache.cassandra.metrics:type=Cache,CounterCache,name=Capacity"
"org.apache.cassandra.metrics:type=Cache.CounterCache,name=Capacity"
"org.apache.cassandra.metrics:type=Cache,type=CounterCache,name=Capacity"

Any ideas?

I looked over Java Management Extensions (JMX) Best Practices and it doesn't mention anything about nested keys.


Solution

  • I noticed that I could add scope to the property list when I looked at jconsole:

    So, what I used was:

    "org.apache.cassandra.metrics:type=Cache,scope=CounterCache,name=HitRate"

    It's nice to know that it's not documented anywhere...