RabbitMQ
RabbitMQ is an open-source message broker that supports multiple messaging protocols including AMQP.
Auto-Detection
Section titled “Auto-Detection”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:
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: 15672EOFCreate or edit C:\ProgramData\glouton\conf.d\99-rabbitmq.conf:
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: 15673Glouton automatically detects configuration changes.
Service Check
Section titled “Service Check”Glouton performs an AMQP protocol check on the configured port to verify that RabbitMQ is responding.
Built-in Metrics
Section titled “Built-in Metrics”| Metric | Description |
|---|---|
service_status | Status of RabbitMQ |
rabbitmq_connections | Number of client connections to the RabbitMQ server |
rabbitmq_consumers | Number of consumers |
rabbitmq_messages_acked | Number of messages acknowledged per second |
rabbitmq_messages_count | Number of messages |
rabbitmq_messages_delivered | Number of messages delivered per second |
rabbitmq_messages_published | Number of messages published per second |
rabbitmq_messages_unacked_count | Number of messages awaiting acknowledgement from a consumer |
rabbitmq_queues | Number of queues |
Glouton collects RabbitMQ logs for analysis in Bleemeo.
Monitoring Troubleshooting
Section titled “Monitoring Troubleshooting”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).
The Service Check is not OK
Section titled “The Service Check is not OK”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 |
Metrics are Missing
Section titled “Metrics are Missing”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:
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:
sudo rabbitmqctl add_user glouton PASSWORDsudo rabbitmqctl set_user_tags glouton monitoringsudo rabbitmqctl set_permissions -p / glouton "" "" ".*"