A quick way to verify the indices of an Elasticsearch cluster. In this example a hostname is configured with multiple IP addresses of Elasticsearch nodes
1 2 3 4 5 6 7 8 9 10 11 12 |
ubuntu@ip-172-16-2-222:~$ for i in $(dig a +short elasticsearch.green.website.com); do > echo $i > curl -GET "$i:9200/_cat/indices" > echo > done 172.16.1.242 green open site1 Cw71FOo_TIeYCcmaDB4lGQ 5 1 185 0 920.7kb 460.3kb green open site2 Z-ckPDijQby1z2yD60CLxg 5 1 185 0 833kb 416.5kb 172.16.3.188 green open site1 Cw71FOo_TIeYCcmaDB4lGQ 5 1 185 0 920.7kb 460.3kb green open site2 Z-ckPDijQby1z2yD60CLxg 5 1 185 0 833kb 416.5kb |
To query the current configuration of an Elasticsearch node in pretty JSON format
1 |
ubuntu@ip-172-16-2-222:~$ curl -GET "172.16.3.188:9200/_nodes/" | python -m json.tool; |