Monitor RabbitMQ message queues and cluster performance. Track queue depth, message rates, consumer health, and resource utilization.
RabbitMQ is a robust, reliable open-source message broker that implements multiple messaging protocols including AMQP, MQTT, and STOMP. It enables distributed applications to communicate through message queues, providing reliable message delivery, flexible routing, and clustering capabilities for high availability.
RabbitMQ exposes comprehensive metrics through its management plugin that can be collected using the OpenTelemetry Collector's RabbitMQ receiver. This integration provides deep visibility into queue performance, message rates, consumer health, and resource utilization.
Before setting up RabbitMQ monitoring, ensure:
For Kubernetes environments, we recommend using the RabbitMQ Cluster Operator to deploy and manage RabbitMQ clusters.
Create a RabbitMQ cluster with the management plugin enabled:
If deploying RabbitMQ manually, ensure the management plugin is enabled:
The OpenTelemetry Collector uses the RabbitMQ receiver to collect metrics from the RabbitMQ management API. Add the following configuration to your collector:
For more configuration options see the receiver documentation in the OpenTelemetry Collector contrib repository
Configure the following environment variables for the collector:
RABBITMQ_USERNAME
: RabbitMQ management usernameRABBITMQ_PASSWORD
: RabbitMQ management passwordDeploy the OpenTelemetry Collector with the RabbitMQ receiver configuration. For detailed deployment instructions, see our other integrations for deploying the OpenTelemetry Collector:
After configuring the collector, verify that metrics are being collected:
rabbitmq.
rabbitmq.message.published
and rabbitmq.node.mem_used
are appearingThe RabbitMQ receiver collects the following key metrics:
rabbitmq.node.disk_free
: Available disk spacerabbitmq.node.mem_used
: Memory usagerabbitmq.node.fd_used
: File descriptors in userabbitmq.node.sockets_used
: Network sockets in userabbitmq.node.proc_used
: Erlang processes in userabbitmq.message.published
: Messages published to queuesrabbitmq.message.delivered
: Messages delivered to consumersrabbitmq.message.acknowledged
: Messages acknowledged by consumersrabbitmq.message.current
: Current messages in queues (ready and unacknowledged)rabbitmq.consumer.count
: Number of consumers connected