Configuring index template to set number of shards


#1

Hi

I was wondering how one would be able to change the default index template. For instance, I would like to configure the number of primary and replica shards for each index.

Is there a way to do it without the API? This is because Logstash is listening in on a live Kafka outlet, so data is almost immediately ingested when my ELK stack boots up.

Any help or direction appreciated.

Thanks!


(Christian Stockhaus) #2

you can define the index template on the es output in logstash
https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-template
and following options

so that logstash will automatically install the index template on startup

es index template definition
https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html#indices-templates


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.