Your RabbitMQ Prometheus setup is fine until the day a queue quietly grows while one node runs short of file descriptors. Nobody gets paged, because nobody watches those two signals. This article starts from that operating decision: what should you measure on a RabbitMQ cluster, how finely, and without flooding your Prometheus? The facts come from the official RabbitMQ Prometheus plugin page, read on 14 November 2026. I did not build a cluster for this article: the examples below are derived from that page, and I flag what remains unverified. If Prometheus-side monitoring is new to you, read how to collect Prometheus metrics on Kubernetes first. The same spirit applies here: few signals, well chosen. The problem: three levels of detail, one budget A broker exposes metrics on three planes: the node (memory, disk, descriptors), queues (ready and unacknowledged messages, consumers) and connections (opens, closes, channels). The deeper you go, the more series you create. The documentation describes two regimes. In aggregated mode, response size stays roughly constant as the object count grows, but you lose per-object fidelity and therefore per-queue alerting. In per-object mode, every object-metric pair becomes a series, which can get very large with many connections or queues. So the real question is not « which metrics to enable » but « which queues deserve a series of their own ». For an SRE, it is a trade-off between storage cost and the ability to tie an alert to an SLO. An order-flow queue deserves detail; a temporary queue of an internal tool does not. Enable the plugin and check port 15692 The plugin is enabled on every node of the cluster: rabbitmq-plugins enable rabbitmq_prometheus curl -s localhost:15692/metrics | head -n 3 rabbitmq-diagnostics -s listeners Enter fullscreen mode Exit fullscreen mode Port 15692 is the default TCP port (prometheus.tcp.port). The documentation uses 15691 as the TLS port in its examples (prometheus.ssl.port). The last command confirms the Prometheus listener is present. Each node exposes its own metrics, so scrape every node rather than a load balancer that rotates between them. Otherwise one node’s series gets mixed with another’s. This file is an example I wrote from the options on the official page. The option prometheus.authentication.enabled = true also exists to require authentication. Listening on 0.0.0.0 is only an illustration: restrict it with a firewall. Which RabbitMQ Prometheus endpoint to pick Four paths exist, each with a distinct use: /metrics: aggregated by default, per-object only if prometheus.return_per_object_metrics = true. /metrics/per-object: always per-object, whatever that setting says. /metrics/detailed: returns nothing without filters. Its metrics use the rabbitmq_detailed_ prefix, so it can run next to /metrics. /metrics/memory-breakdown: memory by component. It iterates over all Erlang processes, so it is costly on a large system: scrape it rarely, or not at all. My suggestion, which is a judgement call and not an official rule: keep aggregated /metrics for the overview, and add a filtered /metrics/detailed for the few queues that matter. Filter queues with /metrics/detailed This endpoint accepts parameters: family (zero or more families), vhost (for queue and exchange families) and queue (a single regular expression). A documented example: GET /metrics/detailed?family=queue_coarse_metrics&family=queue_consumer_count. Here is a Prometheus configuration that separates the node view from the queue view, for three made-up nodes: Two details matter. First, params turns the filters into URL parameters. Second, the ^orders- expression limits detail to queues whose name starts with that prefix: it is your lever against series explosion. The page gives no complete prometheus.yml, so this YAML is mine and I have not run it against a real cluster. The signals to watch: node, queues, connections Per node Among the node families, the documentation lists these detailed metrics: rabbitmq_detailed_process_resident_memory_bytes, rabbitmq_detailed_resident_memory_limit_bytes, rabbitmq_detailed_disk_space_available_bytes, rabbitmq_detailed_process_open_fds and rabbitmq_detailed_process_max_fds, plus rabbitmq_detailed_erlang_scheduler_run_queue. They cover the three resources that bring a broker down: memory, disk and descriptors. Per queue The queue_coarse_metrics and queue_consumer_count families include rabbitmq_detailed_queue_messages_ready, rabbitmq_detailed_queue_messages_unacked, rabbitmq_detailed_queue_messages and rabbitmq_detailed_queue_consumers. A queue growing with zero consumers needs a different remedy from one growing with slow consumers. Per connection and channel For connections, the page lists rabbitmq_detailed_connections_opened_total, rabbitmq_detailed_connections_closed_total, rabbitmq_detailed_connection_channels and rabbitmq_detailed_channel_messages_unacked. A stream of opens without matching closes often points to a leaking client. A cluster caveat: the page states that rabbitmq_cluster_vhost_status, rabbitmq_cluster_exchange_name and rabbitmq_cluster_exchange_bindings are cluster-wide metrics that must not be aggregated across nodes. Cadence and alerts: set thresholds on your own workloads Two intervals combine. Prometheus scrapes every 60 seconds by default; the documentation recommends at least 15 seconds in production. RabbitMQ has a collect_statistics_interval of 5000 ms by default, and the page recommends 10000 in production. With rate(), use a range of about four times the scrape interval. Here are three example alerts, with thresholds I picked for illustration that you must adapt to your workloads (the page says the same of its dashboards): They have not been proven on a real cluster. A « queue without consumers » alert can also fire legitimately for a deliberately idle queue: filter by name. How to check that it works On each node, curl -s localhost:15692/metrics | head -n 3 must return metric lines. In the Prometheus UI, the Targets page must show every target as « Up ». Query rabbitmq_detailed_queue_messages_ready: you should only see queues matching your regular expression. Compare the series count before and after adding /metrics/detailed to measure its cost. For dashboards, the documentation cites RabbitMQ-Overview (Grafana ID 10991) and others, such as Erlang-Distribution and RabbitMQ-Raft. After import, set the prometheus data source as the default. Best practices Scrape each node separately, never a load balancer. Stay aggregated by default, detail only the critical queues. Do not scrape /metrics/memory-breakdown at high frequency. Protect the port with a firewall or enable authentication, then TLS if needed. Tie each alert to an SLO; see also the alerts that really matter on Kubernetes and the definition of an SLI and an SLO. Frequently asked questions What port does the RabbitMQ Prometheus plugin use? The default TCP port is 15692. The TLS examples in the documentation use 15691. Should I enable per-object metrics? Only if you need per-queue or per-connection alerts. They multiply series; prefer aggregated, plus a filtered /metrics/detailed. What about Dynatrace? This article covers only the RabbitMQ plugin and Prometheus. For what Dynatrace offers on RabbitMQ, see docs.dynatrace.com, separating SaaS and Managed: I do not mix any of its features in here. Conclusion Monitoring a RabbitMQ cluster with Prometheus comes down to three decisions: one scrape per node, detail limited to the queues that matter, and alert thresholds fitted to your workloads. Source: RabbitMQ Prometheus plugin documentation. span.observer is an independent community blog, not affiliated with Dynatrace LLC, Broadcom, VMware or RabbitMQ. Trademarks belong to their owners. Tools change quickly: check commands and options against the official documentation. Originally published on span.observer. French version: https://span.observer/fr/rabbitmq-prometheus-surveiller-cluster/.
RabbitMQ Prometheus: monitoring a cluster without drowning in series
Full Article
Original Source
Read the full article at Dev →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.