How can i disable the automatic index creation in elasticsearch?
You can provide an index name pattern to specify whitelist/blacklist. See this for more information.
Automatic index creation can include a pattern based white/black list, for example, set action.auto_create_index to +aaa*,-bbb*,+ccc*,-* (+ meaning allowed, and - meaning disallowed).
I received an error on elastic search node startup saying it couldn't create a ".monitoring" index. Elastic search has some bookkeeping indices it uses that rely on auto-creation, so I needed to enable all indices that start with .
If you define the environment variable on first start up then the following setting will allow any internal .
indices to be created but will disable auto-creating any others:
action.auto_create_index: "+.*"
Here the ".*" is not treated as a dotall regex so it will only match allowing creating indices that start with a literal "."
"action.auto_create_index" is a bit complex beyond the true/false values. We can use patterns occuring in the index names to be identified and can specify whether it can be created automatically if it is not already existing.
An example would be
action.auto_create_index: -b*,+a*,-*
Here the index starting with "a" will be created automatically,but others starting with "b" are not allowed. -* indicates that other indices are not allowed and if you want you need to create them manually.
Also the order of the values also matters. For details,you can visit their documentation here