Hi, I currently use system_cpu_usage metric provided by actuator framework to expose the cpu usage in Prometheus . I see a weird behavior with this metric. After giving correct values for about 3 and half weeks it doesn't show any variation in the values anymore . Is this a known issue or is there a workaround for this issue ? We are using these metrics to monitor the behavior of our production servers and hence very important for us to have correct values of this so that it can be alerted when it goes high. We use the following spring-boot-actuator version : spring-boot-starter-actuator-2.2.6.RELEASE Any help on this is greatly appreciated !
Thanks Debashish
Comment From: wilkinsona
The system CPU usage metric is bound by Micrometer's io.micrometer.core.instrument.binder.system.ProcessorMetrics
. It's backed by the JVM's com.sun.management.OperatingSystemMXBean
and, other than making sure it's bound to the meter registry, is out of Spring Boot's control. It may be that com.sun.management.OperatingSystemMXBean.getSystemCpuLoad()
is returning a value that stops updating or that, for some reason, Micrometer has stopped picking up the new value. You may want to investigate the possibility of the former and, if it's not the case, raise a Micrometer issue for the latter.