Chapter 6. Administer Micrometer in JBoss EAP
6.1. Adding Micrometer subsystem using the Management CLI
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.0 with JBoss EAP XP 5.0 is installed.
- You have access to the JBoss EAP management CLI and permissions to make configuration changes.
Procedure
- Open your terminal.
Connect to the server by running the following command:
./jboss-cli.sh --connect
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
If the Micrometer extension is not available, add it by running the following command:
[standalone@localhost:9990 /] /extension=org.wildfly.extension.micrometer:add
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(endpoint="http://localhost:4318/v1/metrics")
Reload the server to apply the changes:
[standalone@localhost:9990 /] 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
By following these steps, you can add the Micrometer subsystem to your JBoss EAP server using the management CLI, enabling enhanced monitoring capabilities for your applications.
Additional resources