Learn Labs
Operations

Monitoring

The metrics that matter, the built-in Prometheus endpoint, and alerts

RabbitMQ ships a Prometheus endpoint in the core distribution (rabbitmq_prometheus, port 15692). No exporter needed. The Prometheus & Grafana stack scrapes all three nodes as job rabbitmq and provisions a RabbitMQ Overview dashboard.

curl -s localhost:15692/metrics | grep -c '^rabbitmq_'      # ~380 aggregated series per node
cd ../prometheus && docker compose -f compose_prod.yaml up -d
open http://localhost:3001      # Dashboards -> Messaging -> RabbitMQ Overview

By default the endpoint returns aggregated metrics (totals per node), so cardinality stays small however many queues you have. /metrics/detailed (and prometheus.return_per_object_metrics = true) adds per-queue series, which is useful, and expensive with thousands of queues.

The signals that matter

SignalQueryWatch for
Node upup{job="rabbitmq"}Any 0
Resource alarmsrabbitmq_alarms_memory_used_watermark, rabbitmq_alarms_free_disk_space_watermarkAny 1: every publisher is blocked
Backlogsum(rabbitmq_queue_messages_ready)Growing steadily
In flightsum(rabbitmq_queue_messages_unacked)High relative to consumers × prefetch: slow or stuck consumers
Flowrate(rabbitmq_global_messages_received_total[5m]) vs ..._delivered_total and ..._acknowledged_totalPublished > acked for a long time
Redeliveriesrate(rabbitmq_global_messages_redelivered_total[5m])A steady rate: crashing consumers or a poison message
Dead lettersrate(rabbitmq_global_messages_dead_lettered_*_total[5m])Any, by reason
Unroutablerate(rabbitmq_global_messages_unroutable_dropped_total[5m])Any: messages silently lost
Churnrate(rabbitmq_connections_opened_total[5m])High: clients connecting per message
Resourcesrabbitmq_process_resident_memory_bytes vs rabbitmq_resident_memory_limit_bytes; rabbitmq_disk_space_available_bytesApproaching the limits
Raftrabbitmq_raft_commit_latency_secondsRising: replicas or disks are slow

These map to the alerts in prometheus/config/rules/alerts.yml: RabbitMQNodeDown, RabbitMQResourceAlarm, RabbitMQMessagesPilingUp, RabbitMQDeadLettering, and RabbitMQUnroutableMessages.

Health checks

For load balancers and orchestrators, use rabbitmq-diagnostics checks rather than "is the port open":

rabbitmq-diagnostics -q check_running
rabbitmq-diagnostics -q check_local_alarms
rabbitmq-diagnostics -q check_port_connectivity      # what this stack's compose healthcheck uses
rabbitmq-diagnostics -q check_virtual_hosts

Lab

  1. Start the Prometheus stack, open RabbitMQ Overview, and run work_queue.py and reliability.py. Find the publish and ack spikes.
  2. Trigger the memory alarm (see Flow Control) and watch Resource alarms and the RabbitMQResourceAlarm alert.
  3. Run dead_letters.py and find each dead-letter reason on the dashboard.
  4. Publish to an exchange with an unmatched key in a loop and watch the unroutable panel and alert.

On this page