I want to monitor system metrics at my application. I use Spring Boot Actuator but it doesn't have any metrics for CPU usage. I know that such metrics at Spring Boot Actuator retrieve from here:
OperatingSystemMXBean
It has methods like:
getSystemLoadAverage
getAvailableProcessors
There is another class:
MemoryUsage
at which you can retrieve such metrics:
getUsed
getCommitted
However I could not see any metrics for CPU Usage of the Java application at java.lang.management
. How can I retrieve it?