How to enable stats in RabbitMQ management UI
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
RabbitMQ is a popular open-source message broker widely used for its robust messaging capabilities. The RabbitMQ Management UI provides a user-friendly graphical interface to monitor and manage the broker. One valuable feature of this UI is its ability to display statistics about queues, message rates, and other critical metrics. Below, we delve into enabling and understanding the statistics in the RabbitMQ Management UI.
Prerequisites
To proceed, ensure you have:
- Installed RabbitMQ server.
- Enabled the RabbitMQ management plugin. This can be done using the command:
rabbitmq-plugins enable rabbitmq_management
Enabling Statistics
The RabbitMQ Management UI is built into the rabbitmq_management plugin, which provides HTTP-based API for management and a browser-based UI to interact with the broker. Here’s how you can enable detailed statistics reporting in the UI:
- Enable the Management Plugin: First, ensure the management plugin is enabled as mentioned earlier. If it’s not, enable it using the command line.
- Configure Statistics Intervals: RabbitMQ allows you to adjust the interval at which statistics are collected. You can configure these intervals in the RabbitMQ configuration file (
rabbitmq.conf):
The value is in milliseconds. The example above sets RabbitMQ to collect statistics every 5 seconds.
- Restart RabbitMQ Server: After updating the configuration, restart your RabbitMQ server to apply changes:
Accessing the Management UI
Once the plugin is enabled, and the server is running with the appropriate settings:
- Access the management UI by navigating to
http://[your-rabbitmq-server]:15672/. The default username and password areguest/guest, assuming it's accessed locally.
Understanding the UI and Statistics
The RabbitMQ Management UI provides visibility into several metrics which can be crucial for diagnosing issues and ensuring efficient message handling:
- Overview Tab: Shows global figures such as number of connections, channels, exchanges, queues, and messages in the system.
- Queues Tab: Lists all queues and key statistics like message rates (publish, deliver), queue length, consumer count, etc.
- Exchanges, Connections, Channels Tabs: Each provides detailed metrics specific to these components.
Configuration for Large Deployments
In larger RabbitMQ deployments, frequent statistical collection can add noticeable load to the management database. To mitigate this:
- Increase the collection interval to reduce load.
- Consider a dedicated hardware or VM for the RabbitMQ management database.
Summary Table
| Feature | Configuration Key | Default Value | Description |
| Management Plugin | rabbitmq_management | Enabled | Provides HTTP-based API and a browser-based UI. |
| Statistics Interval | management.stats.interval | 5000 (ms) | Time interval for stats collection in milliseconds. |
| Access URL | http://[your-server]:15672/ | N/A | URL to access the RabbitMQ Management UI. |
| Default Credentials | Username/Password | guest/guest | Default login credentials (local access only). |
Conclusion
Monitoring and managing RabbitMQ effectively in a production environment requires a solid understanding of its management interface and the metrics it provides. Properly enabling and configuring the statistics in the RabbitMQ Management UI allows for real-time insights into the behavior and performance of your message broker, ensuring reliable messaging infrastructure for your applications.
Related reading
- How to encode/decode Kafka messages using Avro binary encoder?
- how to enforce schema validation in kafka
- How to ensure task execution order per user using Celery, RabbitMQ and Django?
- How to export data from Kafka to Prometheus?
- How to enable streaming replication in PostgreSQL running in kubernetes pods?
- How to enable/disable buildkit in docker?
- How to expose a headless Kafka service for a StatefulSet externally in Kubernetes
- How to expose Kafka from Docker to the outside world?

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.