Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to access all metrics via JMX?

paulmi1
Level 1
Level 1

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

4 Replies
Jörg_Hoh
Employee
Employee

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

paulmi1
Level 1
Level 1

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...

Jörg_Hoh
Employee
Employee

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

paulmi1
Level 1
Level 1

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....