Plugin (or way) to have RabbitMQ periodically publish stats to a specified exchange?

20 views
Skip to first unread message

er...@24x8.com

unread,
Mar 4, 2018, 4:26:27 PM3/4/18
to rabbitmq-users
I found this (https://github.com/rabbitmq/rabbitmq-management-exchange), but it's (self-admittedly hacky) and still requires a particular stat to be requested. What I'm looking for is a way to configure RabbitMQ to automatically publish a set of specified stats at an interval. Other kinds of brokers (like eMQTT, for example) do this. I was kind of surprised not to "instantly" find this for RabbitMQ, but maybe I'm not looking for the right thing. Does this exist? If not, is there some reason why this has been considered and decided against?
--Eric

Michael Klishin

unread,
Mar 5, 2018, 7:26:28 AM3/5/18
to rabbitm...@googlegroups.com
What stats are we talking? What's the end goal?

RabbitMQ monitoring [3] is done via HTTP API [1], for audit there is the event-exchange [2]
plugin. A small plugin that publishes certain stats to an exchange would not take long to develop
but our small team tries to avoid spending time on features that are not requested often enough.


1. http://www.rabbitmq.com/management.html
2. https://www.rabbitmq.com/event-exchange.html
3. http://www.rabbitmq.com/monitoring.html

On Mon, Mar 5, 2018 at 12:26 AM, <er...@24x8.com> wrote:
I found this (https://github.com/rabbitmq/rabbitmq-management-exchange), but it's (self-admittedly hacky) and still requires a particular stat to be requested. What I'm looking for is a way to configure RabbitMQ to automatically publish a set of specified stats at an interval. Other kinds of brokers (like eMQTT, for example) do this. I was kind of surprised not to "instantly" find this for RabbitMQ, but maybe I'm not looking for the right thing. Does this exist? If not, is there some reason why this has been considered and decided against?
--Eric

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Martin Schröder

unread,
Mar 5, 2018, 8:02:19 AM3/5/18
to rabbitm...@googlegroups.com
2018-03-05 13:26 GMT+01:00 Michael Klishin <mkli...@pivotal.io>:
> plugin. A small plugin that publishes certain stats to an exchange would not
> take long to develop
> but our small team tries to avoid spending time on features that are not
> requested often enough.

There is already a plugin for prometheus, so...

Best
Martin

Eric Lenington

unread,
Mar 6, 2018, 10:07:49 AM3/6/18
to rabbitm...@googlegroups.com
OK. I was a bit surprised that something like this didn't already exist. It seems to me that being able to periodically publish stats to a RabbitMQ exchange would be a fairly useful feature. I realize that there are already various plug-ins and external methods that all essentially access the stats through the HTTP API and then "export" them in some way. To my thinking, since the server already "knows" these stats, why require an external process to periodically poll the API? Instead, add a "stats config" that allows the user to specify a set of "stats message objects", with interval, exchange, topic prefix, and list of stats to include, and simply let RabbitMQ publish those as a message with the stats as a JSON payload.



To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/z9qI4l7LXU0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-users+unsubscribe@googlegroups.com.

Michael Klishin

unread,
Mar 6, 2018, 12:15:30 PM3/6/18
to rabbitm...@googlegroups.com
The reason is quite trivial: most users want to use HTTP API for monitoring, whether it is the optimal thing to do or not.

We have discussed at least two plugins that can "push" notifications about certain pieces of system somewhere, whether for auditing
or monitoring.We already expose internal events via an exchange in at least two other places: the amq.rabbitm q.log exchange
and the event-exchange plugin.

In the end both ideas are just that, ideas that are never a priority. Specifically for stats, there's an extra problem to overcome: these days, stats are stored
across all cluster nodes (as of 3.6.7) and aggregated by the node that handles HTTP API requests. So it would not be as trivial as the event-exchange
plugin.

Gavin M. Roy

unread,
Mar 6, 2018, 7:05:29 PM3/6/18
to rabbitm...@googlegroups.com
Should someone want to look at writing a stats style plugin, here's a very old (probably non-working with current RabbitMQ versions) exchange that did just that:


It was a proof of concept that I never got across the finish line to be a "real" supportable plugin, but might give some ideas as to what can be done. It worked in conjunction with the management plugin to emit stats events on a periodic basis in a variety of formats.

Cheers,

Gavin
Reply all
Reply to author
Forward
0 new messages