Skip to content

How to disable Micrometer metrics (with SpringBoot Actuator) and JMX auto-collection #1445

@adamisvk

Description

@adamisvk

Hi,
in SB Actuator, there are 2 ways to expose micrometer metrics per docs - Web (HTTP) or JMX.
https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html#production-ready-endpoints

In docs for Codeless monitoring, it is said, that Micrometer and JMX Metrics are auto-collected and in configuration, you can disable collection of micrometer metrics.
https://docs.microsoft.com/en-us/azure/azure-monitor/app/java-standalone-config

I did disable collection of micrometer metrics, however they still seem to be collected (version 3.0).

"micrometer": {
    "enabled": false
}

I suspect it is because Actuator by default exposes them via JMX too (in my config, I expose them via Web and JMX).

If that is true, my question is - is it possible to disable auto-collection of micrometer metrics exposed via JMX? Or possibly disable all auto-collection of JMX metrics? And maybe this distinction of exposure of actuator metrics could be mentioned in docs?

I am going to disable exposure of micrometer metrics by JMX in actuator config, I just wanted to know if it was possible to disable auto-collection of JMX metrics.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions