Chapter 6. Understanding Micrometer integration


Micrometer is a vendor-neutral observability facade that provides a reusable API for registering and recording application performance metrics. In JBoss EAP XP 6.0, you can integrate Micrometer so that applications can expose custom metrics and the server can publish metrics by using supported registries.

Note

The extension is not enabled by default. You must add the extension and the subsystem, and you must configure at least one registry. ping endpoint, or both concurrently if your observability strategy requires it.

The Micrometer subsystem enhances monitoring capabilities in JBoss EAP by facilitating comprehensive metrics gathering and publication. However, the org.jboss.extension.micrometer subsystem is available to all standalone configurations within the JBoss EAP distribution, but it must be added manually.

Prerequisites

  • JBoss EAP 8.1 with JBoss EAP XP 6.0 is installed.
  • You have access to the JBoss EAP management CLI and permissions to make configuration changes.

Procedure

  1. Open your terminal.
  2. Connect to the server by running the following command:

    $ ./jboss-cli.sh --connect
  3. Check if the Micrometer extension is already added to the configuration by running the following command:

    [standalone@localhost:9990 /] /extension=org.wildfly.extension.micrometer:read-resource
  4. If the Micrometer extension is not available, add it by running the following command:

    [standalone@localhost:9990 /] /extension=org.wildfly.extension.micrometer:add()
  5. Add the Micrometer subsystem with the required configuration. For example, specify the endpoint URL of the metrics collector by running the following command:

    [standalone@localhost:9990 /] /subsystem=micrometer:add()
  6. Reload the server to apply the changes:

    [standalone@localhost:9990 /] reload

6.2. Configuring the OpenTelemetry (OTLP) exporter

You can configure Micrometer to export metrics to an OpenTelemetry (OTLP) collector endpoint.

Prerequisite

Procedure

  1. Connect to the server using the management CLI:

    $ ./jboss-cli.sh --connect
  2. Configure the Micrometer subsystem with the OTLP collector endpoint:

    1. If the Micrometer subsystem is not present, add it and set the OTLP collector endpoint:

      /subsystem=micrometer:add(endpoint="http://localhost:4318/v1/metrics")
    2. If the Micrometer subsystem already exists, update it to use the OTLP collector endpoint:

      /subsystem=micrometer:write-attribute(name=endpoint,value="http://localhost:4318/v1/metrics")
  3. Reload the server to apply changes:

    reload

When the collector is not running or its collector endpoint is unavailable, then a warning message similar to the following is triggered:

11:28:16,581 WARNING [io.micrometer.registry.otlp.OtlpMeterRegistry] (MSC service thread 1-5) Failed to publish metrics to OTLP receiver: java.net.ConnectException: Connection refused

In JBoss EAP XP 6.0, Prometheus configuration is managed exclusively through system properties. These properties can be set through the command line when starting the server, or persisted in the server configuration using the management CLI. Please note that this might change in a future release.

Use the Prometheus registry to expose a scrape endpoint on the management interface.

Prerequisites

Procedure

  1. Add the Prometheus registry and set the HTTP context path:

    /system-property=org.jboss.eap.xp.micrometer.prometheus.context:add(value="/metrics")
  2. (Optional) Verify or change endpoint security (enabled by default):

    By default, the endpoint requires authentication with a management user account, that is, the same credentials that you use to access the management CLI. To disable this authentication requirement, set the following system property:

    /system-property=org.jboss.eap.xp.micrometer.prometheus.security-enabled:add(value=false)
  3. Reload the server:

    reload

6.4. Removing the WildFly metrics subsystem

After you configure Micrometer to publish metrics for your applications, the WildFly metrics subsystem is no longer required. Both subsystems can collect overlapping metrics, and if Micrometer is configured to expose a metrics endpoint, you may also end up with multiple endpoints. To avoid duplication and simplify the configuration, you can remove the legacy metrics subsystem.

Follow this procedure to remove the WildFly metrics subsystem when you use Micrometer for metrics collection.

Prerequisites

  • Access to the management CLI.

Procedure

  1. Remove the WildFly metrics subsystem and extension, then reload:

    /subsystem=metrics:remove
    /extension=org.wildfly.extension.metrics:remove
    reload

If you use OpenTelemetry for tracing or logging, and Micrometer for metrics, disable OpenTelemetry metrics to avoid duplication.

Prerequisites

  • Access to the management CLI.

Procedure

  1. Set the otel.metrics.exporter system property to none and reload:

    /system-property=otel.metrics.exporter:add(value=none)
    reload
  2. Or configure the property in MicroProfile Config:

    otel.metrics.exporter=none
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top