Skip to content

Monitoring guide

RabbitMQ monitoring: queues, consumers and alarms

RabbitMQ trouble shows up as queues that keep growing. Watch depth, consumers and the broker’s memory and disk alarms, which block publishers when they fire.

4 min read13 sectionsUpdated

On this page

Key points

  • Queue depth growing means consumers cannot keep up.
  • Zero consumers on a busy queue is an outage.
  • Memory and disk alarms block publishers across the cluster.
  • Unacked messages pile up when consumers hang.

Quick checks

bash
rabbitmq-diagnostics status            # memory, disk, alarms
rabbitmqctl list_queues name messages messages_ready messages_unacknowledged consumers
rabbitmq-diagnostics check_local_alarms

What to watch

MetricWorry when
messages_ready per queueGrowing over time
messages_unacknowledgedHigh and not draining: consumers stuck
consumers per queue0 on queues that should be consumed
publish vs deliver/ack ratePublish consistently higher
Memory and disk alarmsAny alarm (publishers are blocked)
Connection and channel churnThousands per minute: clients reconnecting in a loop

Common fixes

  • Set a sensible prefetch (basic.qos) so one consumer does not hoard messages.
  • Add consumers, or make each faster; traces show where consumer time goes.
  • Use dead-letter exchanges for messages that keep failing, instead of requeueing forever.
  • Keep connections long-lived; open channels on them rather than reconnecting per message.

Collecting metrics

otel-collector.yamlyaml
receivers:
  rabbitmq:
    endpoint: http://rabbitmq:15672
    username: otel_monitor
    password: ${env:RABBITMQ_MONITOR_PASSWORD}
    collection_interval: 60s
exporters:
  otlphttp/vitalrix:
    encoding: json
    metrics_endpoint: ${env:VITALRIX_API}/api/v1/metrics/otlp/v1/metrics
    headers: { x-api-key: ${env:VITALRIX_KEY} }
service:
  pipelines:
    metrics: { receivers: [rabbitmq], exporters: [otlphttp/vitalrix] }

RabbitMQ monitoring with VitalRix

Collector metrics arrive over OTLP and can be charted on dashboards and used in alert rules. A TCP check confirms RabbitMQ accepts connections from the network your app uses, and APM traces show which requests wait on RabbitMQ and for how long, from the client spans your instrumented services create. An HTTP check on the management API health endpoint can alert when the broker reports an alarm.

A backlog, explained

The emails queue grows from 0 to 40,000 in an hour while publish rate is normal. Consumers show 4 connected, messages_unacknowledged steady at 40 (prefetch 10 × 4). Consumer traces show each message waiting 8 seconds on the email provider's API, up from 200 ms. The broker is fine; a dependency slowed down. Adding consumers would only hammer the provider; the right fix is a timeout, retry with backoff and a status check on the provider.

Alerts to start with

  • Any memory or disk alarm, immediately.
  • messages_ready growing for 15 minutes on critical queues.
  • 0 consumers on a queue that should be consumed.
  • Dead-letter queue receiving messages.
  • Node down in a cluster.

The RabbitMQ metrics that matter

Enable the built-in Prometheus plugin (rabbitmq-plugins enable rabbitmq_prometheus, port 15692) or read the management API. Watch queues first: a broker can be perfectly healthy while one queue silently fills up.

MetricWhat it tells youStarting alert
Messages ready per queueWork waiting for consumersGrowing for 10 minutes, or above a size you choose per queue
Messages unacknowledgedDelivered but not yet ackedRising while ready also rises: consumers are stuck
Consumers per queueWho is readingZero on a queue that should always have consumers
Publish vs deliver rateIn vs outPublish above deliver for 15 minutes
Memory and disk alarmsBroker flow controlAny alarm: publishers are being blocked
File descriptors and socketsConnection capacityAbove 80% of the limit
Connection and channel churnClients opening and closing constantlyA sustained spike, usually a client bug
bash
# queues with backlog, unacked messages and consumer count
rabbitmqctl list_queues name messages_ready messages_unacknowledged consumers
# alarms and resource use on this node
rabbitmq-diagnostics status | grep -iE "alarm|memory|disk"

What the incidents look like

  • A growing backlog with zero consumers: a worker deployment failed or crashed in a loop. Alert on "no consumers" per critical queue.
  • Unacked keeps rising: consumers take messages and never ack, often because a handler hangs. Set a prefetch limit and a per-message timeout in the consumer.
  • Publishers blocked: the memory or disk alarm fired and RabbitMQ stopped accepting publishes. Producers see timeouts while the broker looks "up".
  • Dead-letter queues filling quietly: messages are failing and nobody looks. Alert on their size like any other queue.

The end-to-end view matters more than any broker metric: trace a message from the publishing request through the consumer with distributed tracing, and you see where time goes when "the email arrived ten minutes late".

Frequently asked questions

What triggers a memory alarm?

Memory use above vm_memory_high_watermark (by default a share of available RAM). Publishers are blocked until it drops.

Quorum or classic queues?

Quorum queues are the recommended replicated queue type for data safety; classic queues suit transient, non-replicated workloads.

  • RabbitMQ queue backlog: how to diagnose and clear it: Fix a growing RabbitMQ queue: tell slow consumers from unacked messages, tune prefetch, recover from memory alarms and protect queues with limits and DLQs.
  • How to monitor Heroku: How to monitor apps on Heroku: H12 timeouts and other router errors, dyno memory (R14), response time, Postgres and Redis add-ons, uptime checks and alerts.
  • HAProxy monitoring: backends, errors and queues: Monitor HAProxy: the stats page and Prometheus endpoint, backend server health, 5xx rates, queue length, session limits and response times, with alerts to set.
  • Redis monitoring: metrics that matter: Monitor Redis with INFO: memory and evictions, hit rate, clients, latency, persistence and replication, with thresholds and the alerts to set.
  • The three pillars of observability: Logs, metrics and traces compared: what each pillar of observability is good at, what it costs, and how to link them so one alert leads to the cause.
  • AWS monitoring with CloudWatch metrics: Monitor AWS workloads: which CloudWatch metrics matter for EC2, RDS, ELB and SQS, the IAM permissions to read them and the alerts to set.

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.