# How to List Indices based on their settings

**URL:** <https://discuss.elastic.co/t/how-to-list-indices-based-on-their-settings/271345>\
**Category:** Elasticsearch\
**Created:** [April 27, 2021, 9:16am UTC](https://discuss.elastic.co/t/how-to-list-indices-based-on-their-settings/271345 "2021-04-27T09:16:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tusharnemade](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tusharnemade](https://discuss.elastic.co/u/tusharnemade)\
**Post date:** [April 27, 2021, 9:16am UTC](https://discuss.elastic.co/t/how-to-list-indices-based-on-their-settings/271345/1 "2021-04-27T09:16:40Z")

</div>

Hello Team

I am using Elasticsearch 5.6.3 version. I know its old , we are in process of upgrading the cluster.

I have a question , How to list Indexes which are having particular settings like :

The ones which are made READ ONLY `{"index.blocks.read_only_allow_delete": "true" }` , only list them using

`_cat/indices? something something `

Could you please help me with framing the query .. I am unable to achieve same ...

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 28, 2021, 1:36am UTC](https://discuss.elastic.co/t/how-to-list-indices-based-on-their-settings/271345/2 "2021-04-28T01:36:25Z")

</div>

The one thing that comes to mind is grabbing your cluster state and then running it through jq (or similar) to look for various settings.

There's no direct way to do this that I know of. Someone else might have a better idea though!

---

<div class="post-metadata">

**Author:** ![tusharnemade](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tusharnemade](https://discuss.elastic.co/u/tusharnemade)\
**Post date:** [April 28, 2021, 11:50am UTC](https://discuss.elastic.co/t/how-to-list-indices-based-on-their-settings/271345/3 "2021-04-28T11:50:10Z")

</div>

Cluster state would not include the settings for each index of it.

I am expecting some \_cat/indices API has option to get to know about index settings or other API call which would list the indices based on settings conditions are met.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 28, 2021, 11:35pm UTC](https://discuss.elastic.co/t/how-to-list-indices-based-on-their-settings/271345/4 "2021-04-28T23:35:26Z")

</div>

> [@tusharnemade](#):
>
> Cluster state would not include the settings for each index of it.

I'm pretty sure that's exactly what would be in there (with other things).

> [@tusharnemade](#):
>
> I am expecting some \_cat/indices API has option to get to know about index settings or other API call which would list the indices based on settings conditions are met.

That does not exist.

Your other option is to raise a feature request and hope that it is implemented.

---

<div class="post-metadata">

**Author:** ![tusharnemade](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tusharnemade](https://discuss.elastic.co/u/tusharnemade)\
**Post date:** [April 29, 2021, 3:03am UTC](https://discuss.elastic.co/t/how-to-list-indices-based-on-their-settings/271345/5 "2021-04-29T03:03:28Z")

</div>

My mistake, I should have checked details properly.

`curl -XGET "10.10.10.2:9200/_cluster/state/blocks/indices?pretty"`

I got indices details who are in READ-ONLY.. Need to use some formatting tool to get data properly. Will check on that too.

Thank You @warkolm

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 29, 2021, 3:16am UTC](https://discuss.elastic.co/t/how-to-list-indices-based-on-their-settings/271345/6 "2021-04-29T03:16:17Z")

</div>

Look at using `jq` or something similar.

---

<div class="post-metadata">

**Author:** ![tusharnemade](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tusharnemade](https://discuss.elastic.co/u/tusharnemade)\
**Post date:** [April 29, 2021, 4:47am UTC](https://discuss.elastic.co/t/how-to-list-indices-based-on-their-settings/271345/7 "2021-04-29T04:47:01Z")

</div>

Okay.

---

<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:** [May 27, 2021, 4:47am UTC](https://discuss.elastic.co/t/how-to-list-indices-based-on-their-settings/271345/8 "2021-05-27T04:47:27Z")

</div>

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