5.2. Enabling the Prometheus metrics plugin for AMQ Broker
When you install AMQ Broker, a Prometheus metrics plugin is included in your installation. Although the plugin is already configured for use, you need to enable the plugin in your broker configuration. When enabled, the plugin collects runtime metrics for the broker and exports these to Prometheus format.
The following procedure shows how to enable the Prometheus plugin for AMQ Broker.
Procedure
-
Open the
<broker_instance_dir>/etc/broker.xmlconfiguration file. Enable the Prometheus plugin in the broker configuration. Add a
<metrics>element with a<plugin>sub-element, configured as shown below.<metrics> <plugin class-name="com.redhat.amq.broker.core.server.metrics.plugins.ArtemisPrometheusMetricsPlugin"/> </metrics>-
Save the
broker.xmlconfiguration file. The metrics plugin starts to gather broker runtime metrics in Prometheus format.