I would like to list all indexes present on an ElasticSearch server. I tried this:
curl -XGET localhost:9200/
but it just gives me this:
One of the best way to list indices + to display its status together with list : is by simply executing below query.
Note: preferably use Sense to get the proper output.
curl -XGET 'http://localhost:9200/_cat/shards'
The sample output is as below. The main advantage is, it basically shows index name and the shards it saved into, index size and shards ip etc
index1 0 p STARTED 173650 457.1mb 192.168.0.1 ip-192.168.0.1
index1 0 r UNASSIGNED
index2 1 p STARTED 173435 456.6mb 192.168.0.1 ip-192.168.0.1
index2 1 r UNASSIGNED
...
...
...