How can I disable automatic index creation in elasticsearch?

I need to disable the automatic creation of an index for an index, but I need to allow it for another. How can I turn off automatic elasticsearch index creation only for a specific index? I tried

action.auto_create_index: false 

in the elasticsearch.yml file, but it seems to turn off automatic indexing for everyone. Can someone help me with this?

+6
source share
2 answers

"action.auto_create_index" is a bit more complicated than true / false values. We can use patterns in the names of indexes that need to be identified, and indicate whether it can be created automatically if it does not already exist.

An example would be

 action.auto_create_index: -b*,+a*,-* 

Here, an index starting with β€œa” will be created automatically, while others starting with β€œb” are not valid. - * indicates that other indexes are not allowed, and if you want them to be created manually.

The order of values ​​also matters. For more information, you can visit their documentation here.

+11
source

You can specify an index name pattern to specify a whitelist / blacklist. For more information, see this .

Automatic index creation can include a white / black list based on templates, for example, set action.auto_create_index to + aaa *, - bbb *, + ccc *, - * (+ value is allowed, and - value is forbidden).

+2
source

Source: https://habr.com/ru/post/989378/


All Articles