Created
November 20, 2012 15:09
-
-
Save drewr/4118487 to your computer and use it in GitHub Desktop.
Check master on each node
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
IF=wlan0 | |
ESPORT=9200 | |
echo -n me: $(sudo ifconfig $IF | sed "s,.*inet addr:\([^ ]*\).*,\1,;tx;d;:x") "master: " | |
curl -s localhost:${ESPORT}/_cluster/state | \ | |
jsawk -n 'out(this.master_node, | |
this.nodes[this.master_node].name, | |
this.nodes[this.master_node].transport_address)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment