Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best way to monitor rabbitmq to make sure everything is running smoothly?

Tags:

rabbitmq

Many times, I get:

-Frozen, load goes to 5.0. Can't use my box. -Just doesn't work.

like image 959
TIMEX Avatar asked Mar 09 '11 18:03

TIMEX


People also ask

How do I check RabbitMQ performance?

Benchmark testing with RabbitMQ's Java Client Tools - PerfTest. PerfTest is a performance testing tool. It starts up zero or more producers and consumers and reports the rate at which messages are sent and received, along with the latency (i.e. time taken for messages to pass through the broker).

How do you check if the RabbitMQ is running?

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.

Which mechanism improves reliability of RabbitMQ?

If you define your behavior in terms of the results it achieves as opposed to the process that achieves it, you will be much better positioned to have an idempotent system. Thus, an at-least-once delivery mechanism, which is trivially available in RabbitMQ, will work for you 100% of the time.


2 Answers

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:

  • Windows O/S level Event Logs/Services
  • Linux O/S level
  • AWS console level
  • RDS, EC2
  • Apache
  • MySQL
  • App integrations / custom NR plugins I've written
  • Rabbit MQ

*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.

like image 185
scipilot Avatar answered Sep 17 '22 15:09

scipilot


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

username: guest
password: guest

Dont forget to change your password later.

like image 21
Shakil Abbas Avatar answered Sep 16 '22 15:09

Shakil Abbas