Disable automatic index creation in elasticsearch

Hi,

I have a setup of ELK 7.10v .
I want to know is there a way to configure elasticsearch not to automatically create indexes.

I tried adding this to my "elasticsearch.yml"

action.auto_create_index: 0

also tried with false value.

action.auto_create_index: false

After giving this parameters in elasticsearch.yml, the elasticsearch was not getting started.

Kindly help,
Tahseen

Per https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html;

Automatic index creation is controlled by the action.auto_create_index setting. This setting defaults to true , which allows any index to be created automatically. You can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns, or set it to false to disable automatic index creation entirely. Specify a comma-separated list of patterns you want to allow, or prefix each pattern with + or - to indicate whether it should be allowed or blocked. When a list is specified, the default behaviour is to disallow.

If you set that to false and saw errors, it'd be helpful if you posted your config and the log.

Hi @warkolm,

I was facing the error by adding this line action.auto_create_index : false in my elasticsearch.yml.
So I removed this line and tried with PUT condition

PUT _cluster/settings
{
"persistent": {
"action.auto_create_index": "false"
}
}

Then it worked for me.

Thank you,
Tahseen