Klaus
Klaus

Reputation: 2590

Elasticsearch: Find out primary shards' running node name?

Suppose an elasticsearch index has 5 primary shards and 2 replica shards for each of the primary shards. Also there are 3 active nodes in the running cluster. How can I find out which primary shards is on which node?

Upvotes: 0

Views: 685

Answers (1)

Nishant
Nishant

Reputation: 7854

You can use cat api with shards as parameter to get the required details.

For e.g. if one of you node is running on localhost port 9200, you can use the below:

http://localhost:9200/_cat/shards?v

Upvotes: 1

Related Questions