# List indices with shards on a given node

**URL:** <https://discuss.elastic.co/t/list-indices-with-shards-on-a-given-node/215486>\
**Category:** Elasticsearch\
**Created:** [January 17, 2020, 3:31pm UTC](https://discuss.elastic.co/t/list-indices-with-shards-on-a-given-node/215486 "2020-01-17T15:31:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikewillis](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mikewillis](https://discuss.elastic.co/u/mikewillis)\
**Post date:** [January 17, 2020, 3:31pm UTC](https://discuss.elastic.co/t/list-indices-with-shards-on-a-given-node/215486/1 "2020-01-17T15:31:10Z")

</div>

Elasticsearch 6.

Is there a nice way to get a list of indices shards of which are on a given node? The only way I can find is to call `_cat/shards` and grep the output for the node name. Node information in Kibana Monitoring shows which indices are on that node but I don't know how it gets that list.

---

<div class="post-metadata">

**Author:** ![mikewillis](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mikewillis](https://discuss.elastic.co/u/mikewillis)\
**Post date:** [January 20, 2020, 10:35am UTC](https://discuss.elastic.co/t/list-indices-with-shards-on-a-given-node/215486/2 "2020-01-20T10:35:50Z")

</div>

Since making the previous post I've realised that what I actually want is a way to set settings for all indices with shards on a node and only those indices. But I can't see a way to do that, other than to get a list of what's on a given node and then parse that. And making use of such a list could be quite tediously slow and/or fiddly even when automated because I'm working with nodes that have shards from ~500 indices on and putting the names of all those in to a single curl command like `index1,index2,index3` doesn't work because the list is too long so it would have to be done in chunks.

What I'd like to do is set `index.unassigned.node_left.delayed_timeout` as described at [https://www.elastic.co/guide/en/elasticsearch/reference/6.8/delayed-allocation.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/delayed-allocation.html) on all the indices shards of which are on a node just before it's temporarily taken out of the cluster for maintenance. I could just set it on all indices, but I'd prefer to set it only on indices which are actually affected by the node going away.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 17, 2020, 10:35am UTC](https://discuss.elastic.co/t/list-indices-with-shards-on-a-given-node/215486/3 "2020-02-17T10:35:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
