Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable stats in RabbitMQ management UI

Tags:

rabbitmq

I am running RabbitMQ inside a container on localhost; my /etc/rabbitmq/rabbitmq.conf is pretty straightforward:

loopback_users.guest = false
listeners.tcp.default = 5672
management.tcp.port = 15672
management.disable_stats = false

I can access management ui with no problem (as a default guest user), but I see no graphs and stats on an Overview tab. And when I enter Channels tab there is only a message:

Stats in management UI are disabled on this node

What can be the reason of this behaviour?

like image 267
dreamca4er Avatar asked Sep 02 '20 14:09

dreamca4er


People also ask

How do I get RabbitMQ metrics?

Once you've started the broker and installed the RabbitMQ management plugin, you'll have access to a built-in metrics UI. Point a browser to the root of the web server, e.g., localhost:15672 , to see a number of dashboards. These correspond roughly to the endpoints of the HTTP API.

How do I enable RabbitMQ management interface?

To enable it, do the following: Open a command-line console (run as Administrator) and change to the RabbitMQ batch scripts folder; Execute the following command: rabbitmq-plugins. bat enable rabbitmq_management.

How do I enable plugins in RabbitMQ?

Different Ways to Enable PluginsThe rabbitmq-plugins command enables or disables plugins by contacting the running node to tell it to start or stop plugins as needed. It is possible to contact an arbitrary node -n option to specify a different node.

How do I check my RabbitMQ dashboard?

A link to the RabbitMQ management interface can be found on the details page for your hosted RabbitMQ solution, your CloudAMQP instance. If you have RabbitMQ installed on localhost, go to http://localhost:15672/ to find the management page.


1 Answers

I encountered exactly the same problem today. If you are using rabbitmq inside a container, make sure you are using the correct image, as stated in their website:

docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management.

The rabbitmq_management plugin is enabled by default.

I was using docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq. I had to manually turn on the management plugin and I encountered your problem.

The reason is that the default image disables metrics collector in the management_agent plugin:

# cat /etc/rabbitmq/conf.d/management_agent.disable_metrics_collector.conf 
management_agent.disable_metrics_collector = true

For deployment, you could turn it on or off through the configuration file. The instruction could be found HERE.

like image 182
Xinyao Wang Avatar answered Oct 07 '22 13:10

Xinyao Wang