Skip to content
BleemeoBleemeo

RabbitMQ

Auto-Detection
Health Check
Built-in Metrics
Logs
Tutorial availableMonitoring RabbitMQ with Bleemeo
Read the tutorial

RabbitMQ is an open-source message broker that supports multiple messaging protocols including AMQP.

Glouton detects RabbitMQ by its process and listening port (default: 5672).

To enable metrics gathering, credentials are required. By default, guest/guest is used.

If auto-detected parameters are incorrect, override them manually:

Terminal window
sudo tee /etc/glouton/conf.d/99-rabbitmq.conf > /dev/null << 'EOF'
service:
# For a RabbitMQ running outside a container
- type: "rabbitmq"
username: "USERNAME"
password: "PASSWORD"
address: "127.0.0.1"
port: 5672 # Port of AMQP service
stats_port: 15672 # Port of RabbitMQ management interface
# For an additional RabbitMQ running outside a container
- type: "rabbitmq"
instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE"
username: "USERNAME"
password: "PASSWORD"
address: "127.0.0.1"
port: 5673
stats_port: 15673
# For a RabbitMQ running in a Docker container
- type: "rabbitmq"
instance: "CONTAINER_NAME"
username: "USERNAME"
password: "PASSWORD"
address: "172.17.0.2"
port: 5672
stats_port: 15672
EOF

Glouton automatically detects configuration changes.

Glouton performs an AMQP protocol check on the configured port to verify that RabbitMQ is responding.

MetricDescription
service_statusStatus of RabbitMQ
rabbitmq_connectionsNumber of client connections to the RabbitMQ server
rabbitmq_consumersNumber of consumers
rabbitmq_messages_ackedNumber of messages acknowledged per second
rabbitmq_messages_countNumber of messages
rabbitmq_messages_deliveredNumber of messages delivered per second
rabbitmq_messages_publishedNumber of messages published per second
rabbitmq_messages_unacked_countNumber of messages awaiting acknowledgement from a consumer
rabbitmq_queuesNumber of queues

Glouton collects RabbitMQ logs for analysis in Bleemeo.

See Troubleshoot a Service Check or Missing Metrics for what applies to every service: finding the address and port Glouton really uses, what each check message means, and how to read the collection error — which does not appear in the agent logs at the default level.

The check and the metrics talk to two different ports: the check to the AMQP port (port, default 5672), the metrics to the management API (stats_port, default 15672).

Glouton sends an AMQP protocol header on the AMQP port and expects a protocol answer:

Status text Cause Fix
TCP port 5672, Connection refused RabbitMQ listens on another port, or is not running Set port, or start the broker
TCP port 5672, unexpected response "..." Something that is not RabbitMQ answers on that port, or the port only accepts AMQPS The check speaks plain AMQP: point it at the plain-text listener
TCP port N, connection timed out after 10 seconds A firewall drops the packets Open the port for the agent

A passing check says nothing about the metrics: they are collected separately.

Metrics come from the management API, which Glouton queries as username/password (default guest/guest) on /api/overview, /api/nodes, /api/queues and /api/exchanges.

Query the API the way Glouton does, from the machine where the agent runs:

Terminal window
curl -i -u glouton:PASSWORD http://127.0.0.1:15672/api/overview
What you see Cause Fix
a connection error on port 15672 The management plugin is not enabled sudo rabbitmq-plugins enable rabbitmq_management
a connection error The management interface is on another port Set stats_port
401 when the agent connects from a container or another host guest is restricted to loopback — the RabbitMQ default Create a dedicated user, and set username and password
401 Wrong credentials Fix username and password
403 on the API The user has no monitoring tag sudo rabbitmqctl set_user_tags USERNAME monitoring

A dedicated monitoring user:

Terminal window
sudo rabbitmqctl add_user glouton PASSWORD
sudo rabbitmqctl set_user_tags glouton monitoring
sudo rabbitmqctl set_permissions -p / glouton "" "" ".*"