Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stats for RabbitMQ's Federation plugin when it is available/in use #6274

Closed
jacquesh opened this issue Aug 16, 2019 · 3 comments · Fixed by #6283
Closed

Add stats for RabbitMQ's Federation plugin when it is available/in use #6274

jacquesh opened this issue Aug 16, 2019 · 3 comments · Fixed by #6283
Labels
area/rabbitmq feature request Requests for new plugin and for new features to existing plugins

Comments

@jacquesh
Copy link
Contributor

Feature Request

Would you consider adding reporting for the pre-packaged Federation plugin for RabbitMQ?

Use case:

I have two RabbitMQ clusters with similar setups and queues that exist on both clusters have federation links connecting them. I would like to gain some visibility on how often (and to what extent) these federation links get used. Essentially I'm just looking for a rate of message transfer between the two clusters (per queue & federation upstream).

Current behavior:

No federation-related statsare reported

Desired behavior:

Telegraf reports stats for running federation links.

Admittedly I understand that this might be a bit of slippery slope in terms of data collected from RabbitMQ. For example I can imagine being interested in similar information from the Shovel plugin and I'm sure somebody somewhere has other RabbitMQ plugins that they use that they might want to collect metrics for.

@danielnelson
Copy link
Contributor

I think this would be a nice feature, would be interesting to see an example of the output from GET /api/federation-links.

@danielnelson danielnelson added area/rabbitmq feature request Requests for new plugin and for new features to existing plugins labels Aug 16, 2019
@jacquesh
Copy link
Contributor Author

The management API for federation doesn't appear to be particularly well documented (that I can see), but I ran a quick test from my machine to a local server and I got this output

I'm happy to contribute the feature, but the main question is what set of fields should be collected?
Just from looking at that output, as a first approximation I would suggest the following:

Tags

  • url
  • (local) queue
  • upstream queue
  • (local) exchange
  • upstream exchange
  • vhost
  • upstream

Fields:

  • ACKs uncommitted
  • Consumers
  • Messages unacknowledged
  • Messages uncommitted
  • Messages unconfirmed
  • Messages confirmed (with rate)
  • Messages published (with rate)
  • Messages returned (with rate)

I'm not sure that it is useful to have all of those though, thoughts?

@danielnelson
Copy link
Contributor

That looks good, the one change I would make is to skip the rate stats as these can be calculated from the raw counters at query time. Anything we leave out can always be added later, in case we decide we need prefetch, reductions, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rabbitmq feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants