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, or 15694 with 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.
Note:

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:

copy
icon/buttons/copy
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: true on the plugin you use and enabled: false on the other. The sample above uses the Management plugin.
  • For the Prometheus plugin, keep metrics_path: /metrics and isPrometheus: true. Use port 15694 in hosts if your RabbitMQ serves Prometheus metrics over TLS.
  • For the Management plugin, set rabbitmq_user and rabbitmq_pass to a RabbitMQ user that can read the Management API. The default guest user can only connect from localhost, so create a user with the monitoring tag 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:

copy
icon/buttons/copy
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:

copy
icon/buttons/copy
# Log Section
logs:
  - type: error
  - type: access

If your logs are in a different location, replace the two default types with your own paths:

copy
icon/buttons/copy
# 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:

copy
icon/buttons/copy
curl http://<HOST>:15692/metrics

For the Management plugin:

copy
icon/buttons/copy
curl -u <USER>:<PASSWORD> http://<HOST>:15672/api/overview

Restart the Agent

After configuration, restart the Atatus Infrastructure Agent:

copy
icon/buttons/copy
sudo service atatus-infra-agent restart