How to access all metrics via JMX? | Community
Skip to main content
November 21, 2021
Solved

How to access all metrics via JMX?

  • November 21, 2021
  • 1 reply
  • 1854 views

Hi,

I want to monitor my AEM 6.5 installation by using JMX.

Looking at /system/console/jmx I thought I am able to e.g. read 'DISK_USABLE_SPACE' (and other metrics).

While I can read some values/metrics e.g. this:

java -jar cmdline-jmxclient-0.10.3.jar - localhost:12345 org.apache.jackrabbit.oak:name=SESSION_COUNT,type=Metrics Count

gives:

11/21/2021 13:41:42 +0100 org.archive.jmx.Client Count: 126

But a

java -jar cmdline-jmxclient-0.10.3.jar - localhost:12345 com.adobe.granite:name=DISK_USABLE_SPACE,type=Metrics Value

gives:

11/21/2021 13:56:39 +0100 org.archive.jmx.Client com.adobe.granite:name=DISK_USABLE_SPACE,type=Metrics is not a registered bean

So the question is: How do I acess ALL the metrics I see at /system/console/jmx by using JMX?
Is there an option I have to activate to enable or what is the reason I am not able to read all the values I see?
(Yes the same happens if I use 'jconsole'.)

Best regards,

Paul

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

When I test with this with a recent local AEM SDK instance, I can see the MBean

 

com.adobe.granite:name=DISK_USAGE_SPACE,type=Metrics

 

in jconsole by default, without turning on something special. And that should be the same in AEM 6.5

1 reply

joerghoh
Adobe Employee
Adobe Employee
November 21, 2021

Can you check with jconsole, if it can display this mbean?

paulmi1Author
November 21, 2021

If I start 'jconsole', click at tab 'MBeans', click at 'com.adobe.granite' I only see 'GraniteSystemStats' and 'Repository' below it.
If I am correct I should also be able to see 'Metrics' here, but it is not there!
So I wonder if I have to enable something or (re)start some service for it...

paulmi1Author
November 29, 2021

When I test with this with a recent local AEM SDK instance, I can see the MBean

 

com.adobe.granite:name=DISK_USAGE_SPACE,type=Metrics

 

in jconsole by default, without turning on something special. And that should be the same in AEM 6.5


When I do this with a raw/empty 6.5 installation I also see the Metrics.
Because we didn't see them in our current 6.5 installation which is an old CQ 5.X updated over the years we start from scratch:
Export our content / applications, setup a new 6.5 and start to integrate our application/data.
And now I can see the Metrics as expected!
So remember: Always do the export/import way instead of in-place-updating for avoiding such confusion....