To enable Prometheus metrics in RabbitMQ, we need to enable the Prometheus plugin and expose the metrics endpoint. Here are the steps.
Run this command on the RabbitMQ server:
This enables the rabbitmq_prometheus plugin which exposes metrics in Prometheus format.
Check installed plugins:
You should see:
RabbitMQ exposes metrics at:
If enabled correctly, you'll see Prometheus formatted metrics like:
Edit your Prometheus config (prometheus.yml):
Then restart Prometheus.