How to List Indices based on their settings

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 ...

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!

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.

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

That does not exist.

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

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

1 Like

Look at using jq or something similar.

Okay.

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