Healthcheck for LoadBalancers

250 views
Skip to first unread message

Mike Winkelmann

unread,
Feb 18, 2016, 6:05:56 AM2/18/16
to rabbitmq-users
Hi guys,

is there a possibility to check the health of a rabbitmq node without installing the Mgmt-Plugin?
The Mgmt-Plugin generates so much heavy load in my cluster. Thereafter I have installed the Mgmt-Plugin only on one node to have one possibility to get some informations about cluster state graphically.

My imaginations of a good healthcheck is:
* the node is successfully joined to the cluster
* a test message is send due a queue and is also received
* ...

Does anyone has an idea?

Best
Mike

Anthony Kinaesthetic

unread,
Feb 18, 2016, 6:16:55 AM2/18/16
to rabbitmq-users
In the API you can find those 3 Web Services:

/api/nodes (GET)

A list of nodes in the RabbitMQ cluster.

/api/nodes/name (GET)

An individual node in the RabbitMQ cluster. Add "?memory=true" to get memory statistics, and "?binary=true" to get a breakdown of binary memory use (may be expensive if there are many small binaries in the system).

/api/aliveness-test/vhost (GET)

Declares a test queue, then publishes and consumes a message. Intended for use by monitoring tools. If everything is working correctly, will return HTTP status 200 with body:
{"status":"ok"}
Note: the test queue will not be deleted (to to prevent queue churn if this is repeatedly pinged)

I think you can do yourself a script that call those WS or using something like Nagios.

Michael Klishin

unread,
Feb 18, 2016, 6:17:24 AM2/18/16
to rabbitm...@googlegroups.com, Mike Winkelmann
On 18 February 2016 at 14:05:59, Mike Winkelmann (mikedotw...@gmail.com) wrote:
> My imaginations of a good healthcheck is:
> * the node is successfully joined to the cluster
> * a test message is send due a queue and is also received
> * ...
>
> Does anyone has an idea?

rabbitmqctl status in 3.6.0 includes a list of alarms and usually exits with a sensible
exit code when things fail. Some use list_channels as a health check.

There is no "aliveness test" alternative in rabbitmqctl. It's fairly easy to add one but there is
no consensus on what exactly it should do (after months of mulling over this). 
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Reply all
Reply to author
Forward
0 new messages