In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
What this article shares with you is about the simplest RabbitMQ monitoring method. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article. Let's take a look at it with the editor.
OpenStack usually uses RabbitMQ to implement message queues, and almost all OpenStack modules use RabbitMQ. If RabbitMQ dies, OpenStack will collapse. It can be said that it is the most important component.
Let's discuss how to monitor the status of RabbitMQ and introduce a very simple and efficient method.
Enable RabbitMQ Management plugin
In the default installation, we can only use the command rabbitmqctl to monitor RabbitMQ, such as subcommands such as rabbitmqctl list_queues,rabbitmqctl list_exchanges. This approach is not very intuitive and inefficient.
Fortunately, RabbitMQ has a management plugin that provides a graphical management interface that can be enabled by executing the following commands on the node running RabbitMQ (usually the control node).
Rabbitmq-plugins enable rabbitmq_management
Then you need to create a user to log in to the administrative console.
Rabbitmqctl add_user user_admin passwd_admin
Rabbitmqctl set_user_tags user_admin administrator
Rabbitmqctl set_permissions-p / user_admin ". *" >
Then you can log in with user_admin (password passwd_admin) at
Http://server-name:15672/
The simplest and most efficient monitoring method
The Web console displays a lot of RabbitMQ information, but the most important one is Unacked Message. This data will be displayed directly in the Overview tab after login, which can be seen at first glance.
Unacked Message refers to messages that have not yet been processed. Normally, this value should be 0. If this value is not 0 and continues to grow, you should be aware that there is a problem with RabbitMQ, queues start to backlog, and messages start to pile up, which is a serious signal.
What shall we do next?
At this point, you can click on the tab behind the Overview to see which Connection,Channel,Exchange,Queues or Connection,Channel,Exchange,Queues the messages are stacked in, and then analyze the root cause of the problem and solve it.
A real case.
1. The customer's OpenStack suddenly hung up after a month of normal operation.
two。 Log analysis found that nova,neutron and other modules reported that the relevant queue could not be found. Because the logs of multiple modules all point to RabbitMQ, it seems that RabbitMQ is the most suspected.
3. Error has been browsing the screen continuously in the RabbitMQ log, but the information is very general. At this point, RabbitMQ is already in a non-working state and can only restart RabbitMQ.
4. After RabbitMQ restarts, OpenStack resumes automatically.
5. Open the RabbitMQ Web console and find Unacked Message > 0.
6. After observing for a period of time, it was found that Unacked Message continued to grow at a fixed rate.
7. Locate the reasons for the growth of Message and find that they all come from Ceilometer-related Queue.
8. Check the Ceilometer and find a configuration error that causes the data sent by Ceilometer to Queue not to be processed.
9. Modify the configuration, restart Ceilometer,Unacked Message starts to drop, and finally remains at 0.
This problem is like a memory leak, where Unacked Message accumulates and eventually overwhelms the entire OpenStack.
These are the simplest RabbitMQ monitoring methods, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.