Created
May 11, 2016 01:11
-
-
Save slackorama/930c759faf6e5277ffdd9c3670325598 to your computer and use it in GitHub Desktop.
Get the master that each node is using
This file contains hidden or 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 h in $list_of_es_hosts; do | |
echo -n "$h "; | |
curl -s http://$h:9200/_cluster/state/master_node,nodes | \ | |
jq '.master_node as $master | .nodes[$master].name'; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment