How to disable auto index creation in Elasticsearch?


(Shaunak Kashyap) #1

Set this in your elasticsearch.yml configs for the cluster:

action.auto_create_index: false 

That will prevent indices from being automatically created.


(Anubha Agrawal) #2

Getting an error on restarting elasticsearch.
In elasticsearch.yml file I added line-

action.auto_create_index: +name*, -*

After this I tried to restart elasticsearch and I got the following error-

[2017-03-06T13:57:22,573][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node-1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: ElasticsearchException[Failed to load plugin class [org.elasticsearch.xpack.XPackPlugin]]; nested: InvocationTargetException; nested: IllegalArgumentException[the [action.auto_create_index] setting value [+name*, -] is too restrictive. disable [action.auto_create_index] or set it to [.watches, .triggered_watches, .watcher-history-]];


(system) #3