监控rabbitmq以确保一切顺利运行的最佳方法是什么?
很多次,我得到:
-冻结,负载变为 5.0。不能用我的盒子。 -就是不行。
Many times, I get:
-Frozen, load goes to 5.0. Can't use my box.
-Just doesn't work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
执行以下步骤:
1.rabbitmq-plugins启用rabbitmq_management
2.服务rabbitmq-server重新启动
3.浏览到http://rabbitmq-server-ip: 15672
4.登录
后不要忘记更改密码。
Do following steps:
1.rabbitmq-plugins enable rabbitmq_management
2.service rabbitmq-server restart
3.browse to http://rabbitmq-server-ip:15672
4.login with
Dont forget to change your password later.
有许多 RabbitMQ 监控插件可用于不同的监控系统,如 Nagios、Zabbix 等。
看看http://www.rabbitmq.com/how.html#management
使用rabbitmqctl是检查节点状态的最直接的解决方案。
这应该告诉您 RabbitMQ 节点的状态。
There are bunch of RabbitMQ monitoring plugins available for different monitoring systems like Nagios, Zabbix etc.
Look at http://www.rabbitmq.com/how.html#management
Using rabbitmqctl is the most straight forward solution to check the status of the node.
This should tell you the status of the RabbitMQ node.
正如 sheki 指出的那样,rabbitmqctl 是您进行诊断和构建监控的第一个端口,但它不适合直接作为手动命令行进行实际监控。
我发现 DataDog 非常适合监控 MQ 详细信息以及并行的主机平台。例如,您可以监视队列级别并设置队列备份警报,同时还可以监视这些队列级别造成的 CPU/内存/IO。它确实有助于获取资源使用率,而且警报也很好。拥有一个用于基础设施和应用程序级别监控的统一平台非常罕见,但可以极大地加快生产问题的诊断速度。
NewRelic 类似,也有一个 RabbitMQ 插件,虽然我没有专门使用过这个插件,但我已经使用 NR 多年了,发现它在诊断操作问题方面非常有价值。
AppDynamics 是另一个示例。同样,这允许您从高级仪表板深入了解您的应用程序,并直观地从问题导航到原因。它特别适合可视化跨各种服务/服务器的分布式应用程序的网络。例如,我使用它来查找使用第 3 方 Web 服务的 .NET 应用程序和 SQL Server 集群中的复杂问题(例如,通过繁琐的协议延迟及其对应用程序的影响)。这些事情很难诊断,特别是对于仅限于检查代码的开发人员来说。诊断运营问题需要更广阔的视野。
我什至放弃了安装和配置 Nagios 的尝试。我知道这是“最好的”,但它是我们没有时间管理的古老自我配置野兽中最好的。我什至没有开始......并最终转向更“现代”的云方法。一旦你克服了信任因素,那就相当自由了。
我一起使用这些 APM 平台*来聚合来自以下位置的数据:
*NewRelic 可以输入 Datadog!因此,如果您已经在使用 NR,则无需在这些主机上安装 DD。
能够同时查看所有这些级别,让您能够了解发布者、中间件、MQ 服务器、工作人员和前端 -最终应用程序 - 一切都在一个仪表板中。
我强烈推荐这样的方法,因为仅查看一台服务器就会让您感到很多头痛。在一个可定制的仪表板中看到整个堆栈非常有启发性,可以消除大部分猜测。
担心安装这些东西吗?我发现 New Relic 特别轻且不引人注目。 AppDynamics 似乎对主机的压力更大,但主要是因为您必须在主机上运行可视化工具! (这可能已经改变)。 DataDog 看起来性能很高,但在目标主机上创建了很多控制面板/图标(可能只是视觉印象)。
对于一个四年前的问题 - 这个答案可能在 2011 年还没有,但在 2015 年,这些曾经“初创”风格的 APM 服务每月只需数十或数百美元,就可以提供令人难以置信的丰富企业级解决方案。
As sheki notes,
rabbitmqctl
is your first port of call for diagnostics, and for building monitoring on top of, but it's not suitable for actual monitoring directly being a manual command line.I've found DataDog very good to monitor both the MQ details, plus the host platform in parallel. e.g. you can watch the queue levels and set alerts on queues backing-up, while also watching the CPU/memory/IO inflicted by these queue levels. It really helps to get ratios of resource usage, and the alerts are good. Having a uniform platform for both infrastructure and application level monitoring is surprisingly rare, but speeds up diagnoses of production issues hugely.
NewRelic is similar and also has a RabbitMQ plugin, although I've not used this plugin specifically, I've used NR for years and found it invaluable in diagnosing operational issues.
AppDynamics is another example. Similarly this allows you to drill down into your app from a high-level dashboard, and visually navigate from problems to causes. It's especially good with visualising the network of a distributed application across various services/servers. I've used this, for example, to find complex problems in .NET applications and SQL Server clusters using 3rd party Web Services (e.g. latency and its consequences to your app over chatty protocols). These things are very difficult to diagnose, especially for developers who are limited to checking their code. Diagnosing operational issues requires a much broader picture.
I gave up trying to even install and configure Nagios. I know it's the 'best' but it's the best of an old breed of self-configured beasts which we don't have time to manage. I didn't even get it going... and eventually turned to the more 'modern' cloud approach. Once you get over the trust factor, it's pretty liberating.
I'm using these APM platforms together* to aggregate data from:
*NewRelic can feed into Datadog! So if you are already using NR you don't need to install DD on those hosts as well.
Being able to view all these levels together gives you a view on the publishers, middleware, MQ servers, workers and front-end app - all in one dashboard.
I would highly recommend an approach like this, because just looking at one server alone leads you to a lot of head-scratching. Seeing an entire stack in one customisable dashboard is just so illuminating it takes most of the guesswork out of it.
Worried about installing these things? I found New Relic to be especially light-weight and unobtrusive. AppDynamics seemed to stress the host a bit more, but mostly that's because you had to run the visualisation tools on the host! (this may have changed). DataDog seems performant, but creates a lot of control panels/icons on the target host (perhaps just a visual impression).
To a four year old question - this answer probably wasn't available in 2011, but in 2015 these once 'startup' style APM services are just tens or hundred dollars a month for an unbelievably rich enterprise-level solution.
如果您有 PRTG(或任何具有 HTTP 传感器检查功能的探测系统),您可以检查下页所述的服务器状态:
https://blog.cdemi.io/monitoring-rabbitmq-in-prtg/
特别是你必须
完成后,您可以使用 API 检查服务器的概述:
其中您有一个 JSON,其中包含有关服务器、活动连接、队列等的所有详细信息。
If you have PRTG (or any probe system with a HTTP sensor check), you can check the server status described at the following page:
https://blog.cdemi.io/monitoring-rabbitmq-in-prtg/
In particular you have to
Once done, you can check the overview of your server with the API:
Where you have a JSON with all details about the server, active connections, queues, etc.
此命令将帮助您
servicerabbitmq-server status
或$rabbitmqctl status
或尝试这些
servicerabbitmq-server stop
和servicerabbitmq-服务器启动
,然后服务rabbitmq-server status
。This cmd will help you
service rabbitmq-server status
or$ rabbitmqctl status
OR try these
service rabbitmq-server stop
andservice rabbitmq-server start
thenservice rabbitmq-server status
.