Skip to content

Instantly share code, notes, and snippets.

@slackorama
Created May 11, 2016 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slackorama/930c759faf6e5277ffdd9c3670325598 to your computer and use it in GitHub Desktop.
Save slackorama/930c759faf6e5277ffdd9c3670325598 to your computer and use it in GitHub Desktop.
Get the master that each node is using
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