Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of Web Management and Monitoring in RabbitMQ

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the example analysis of Web management and monitoring in RabbitMQ, which has a certain reference value, and interested friends can refer to it. I hope you will gain a lot after reading this article.

RabbitMQ provides complete management and monitoring tools.

1 、 MANAGEMENT PLUGIN

Rabbitmq-management plugin provides HTTP API to manage and monitor RabbitMQ Server, including the following features:

Delete, generate, list, including: exchanges,queues,bindings,users,virtual hosts and permissions.

Monitor the queue length, message rates of each channel, data rates of each connection, and so on.

Send and receive messages.

Monitor Erlang processes,file descriptors,memory use.

Export / export object definitions to JSON.

Forcibly close connections and empty queues.

By default, management plugin is in the release version of RabbitMQ. All you need is enable. Execute the following command:

$cd / usr/lib/rabbitmq/bin/$ sudo rabbitmq-plugins enable rabbitmq_management

To see this behind the scenes, just restart RabbitMQ. It should be noted that mochiweb must have, mochiweb is a lightweight, efficient HTTP application framework Erlang library used to build Web applications.

You can access the management and monitoring interface in two ways:

2. WEB UI manages the message server

Open a browser and enter http://[server-name]:15672/ such as http://localhost:15672/. You will be asked to enter a user name and password with the default guest/guest (guest/guest users can only log in from the localhost address. If you want to configure remote login, you must create another user). After confirmation, the following interface appears:

Then you can control RabbitMQ.

3. Add a remote management account

What do I do if I want to log in remotely? For security reasons, guest, the default user, can only log in through http://localhost:15672, and other IP cannot use this guest account directly. Here we can log in from the remote login management interface through the configuration file, as long as you edit the / etc/rabbitmq/rabbitmq.config file (if you don't have it, add it) and add the following configuration.

[{rabbit, [{tcp_listeners, [5672]}, {loopback_users, ["asdf"]}]}.

Now a new authorized user asdf has been added, which can be used remotely. Remember to add this command with the command first:

$cd / usr/lib/rabbitmq/bin/# username and password $sudo rabbitmqctl add_user asdf 12345 users set to administrator to remotely access $sudo rabbitmqctl set_user_tags asdf administrator $sudo rabbitmqctl set_permissions-p / asdf ". *"

In fact, you can also add information such as users and passwords directly through the management platform page.

If there is no remote access or remote login check is not 5672, port 15672 is not open!

Thank you for reading this article carefully. I hope the article "sample Analysis of Web Management and Monitoring in RabbitMQ" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report