Skip to content

Instantly share code, notes, and snippets.

@scottillogical
Created November 6, 2018 21:43
Show Gist options
  • Save scottillogical/5e739f55ff58b0b709221b9035d92cc9 to your computer and use it in GitHub Desktop.
Save scottillogical/5e739f55ff58b0b709221b9035d92cc9 to your computer and use it in GitHub Desktop.
show rabbitmq queue master distribution
for node in $(curl -s -u user:pass http://localhost:15672/api/nodes | jq '.[]' | jq -r '.name'); do echo $node; curl -s -u user:pass http://localhost:15672/api/queues | jq --arg NODE "$node" '.[] | select(.node | contains($NODE)) | .name ' | wc -l ; done
# OUTPT:
# rabbit@6f419d949cc1049ab273a09da19259fd
# 94
# rabbit@b164f368cc1ad8f64b54794f5fec955e
# 381
# rabbit@c5e18a7747eb7fbdd4f53b4b756557f2
# 9
@scottillogical
Copy link
Author

This script shows the distribution of master queues in rmq per node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment