The RabbitMQ integration allows you to monitor your RabbitMQ message broker with the Atatus Infrastructure Agent. This check enables you to track the health and performance of your messaging system in real-time.
Use this integration to:
- Track queue-based statistics such as queue size, consumer counts, unacknowledged messages, and redelivered messages.
- Monitor node-based metrics including waiting processes, used sockets, and file descriptor usage.
- Observe vhost aliveness and the number of active connections.
- Collect RabbitMQ error and access logs.
All metrics collected through this integration are treated as custom metrics.
| Component | Details |
|---|---|
| Operating Systems | Linux, Windows |
| Agent Version | 4.1.0 or later |
Setup
No additional installation is required. The RabbitMQ integration is bundled with the Atatus Infrastructure Agent.
Configuration
The agent can collect RabbitMQ metrics in two ways:
- RabbitMQ Prometheus Plugin (recommended): serves plain text metrics on port
15692, or15694with TLS. Starting from RabbitMQ v3.8, this plugin ships with RabbitMQ. - RabbitMQ Management Plugin (legacy): serves JSON metrics through the Management API on port
15672.
The Prometheus plugin configuration requires the Atatus Infrastructure Agent v4.1.0 or later for optimal metric scraping.
Metrics
Add the following configuration to /etc/atatus-infra-agent/conf.d/rabbitmq.d/rabbitmq.yaml. The first entry uses the Prometheus plugin and the second uses the Management plugin:
metrics:
# RabbitMQ Prometheus Plugin (Recommended)
# Speaks plain text metrics on port 15692 / 15694.
# Enable this entry only if you want Prometheus metrics.
- hosts: ["localhost:15692"]
metrics_path: /metrics # Required path for Prometheus
enabled: false # Set true to use Prometheus
namespace: rabbitmq
isPrometheus: true # MUST be true for port 15692
# RabbitMQ Management Plugin (Legacy)
# Speaks JSON on port 15672.
# Enable this entry only if you want Management API metrics.
- hosts: ["localhost:15672"]
metrics_path: "/api/" # Base path for Management API
enabled: true
rabbitmq_user: guest
rabbitmq_pass: guest
Check these before you save:
- Enable only one entry. Set
enabled: trueon the plugin you use andenabled: falseon the other. The sample above uses the Management plugin. - For the Prometheus plugin, keep
metrics_path: /metricsandisPrometheus: true. Use port15694inhostsif your RabbitMQ serves Prometheus metrics over TLS. - For the Management plugin, set
rabbitmq_userandrabbitmq_passto a RabbitMQ user that can read the Management API. The defaultguestuser can only connect fromlocalhost, so create a user with themonitoringtag if the agent runs on another host.
Logs
Logs are configured in the same file as metrics. First, turn on log collection for the agent in /etc/atatus-infra-agent/atatus.yml:
logs_enabled: true
Then add a logs section to /etc/atatus-infra-agent/conf.d/rabbitmq.d/rabbitmq.yaml. The two default types pick up the standard RabbitMQ log paths:
# Log Section
logs:
- type: error
- type: access
If your logs are in a different location, replace the two default types with your own paths:
# Log Section
logs:
- type: error
paths:
- /var/log/rabbitmq/error.log*
source: rabbitmq
service: rabbitmq
- type: access
paths:
- /var/log/rabbitmq/access.log*
source: rabbitmq
service: rabbitmq
Verify Metrics
You can verify metric collection by calling the endpoint of the plugin you enabled.
For the Prometheus plugin:
curl http://<HOST>:15692/metrics
For the Management plugin:
curl -u <USER>:<PASSWORD> http://<HOST>:15672/api/overview
Restart the Agent
After configuration, restart the Atatus Infrastructure Agent:
sudo service atatus-infra-agent restart
+1-415-800-4104