Created
November 6, 2018 21:43
-
-
Save scottillogical/5e739f55ff58b0b709221b9035d92cc9 to your computer and use it in GitHub Desktop.
show rabbitmq queue master distribution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script shows the distribution of master queues in rmq per node