How can I go about setting the default number of replications and shards for any new indices that will be created in ES? I know that you can use the API to define these for an already created index, but I would like to create my ES cluster, define default # of replications and shards for any index that is created and then let logstash start creating indices.
You should have a look at index templates. I use those to configure shard, replicas and mappings for my logstash indices.
https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html
2 Likes
Thanks for the reference. I found this late last night and created a template this morning. I then created a new index that matched the template and it created the correct number of shards and replicas.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.