# Change default shards in Logstash

**URL:** <https://discuss.elastic.co/t/change-default-shards-in-logstash/163664>\
**Category:** Logstash\
**Created:** [January 10, 2019, 7:11am UTC](https://discuss.elastic.co/t/change-default-shards-in-logstash/163664 "2019-01-10T07:11:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![josephmanalo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/josephmanalo/32/38163_2.png) [@josephmanalo](https://discuss.elastic.co/u/josephmanalo)\
**Post date:** [January 10, 2019, 7:11am UTC](https://discuss.elastic.co/t/change-default-shards-in-logstash/163664/1 "2019-01-10T07:11:31Z")

</div>

Hi. I have read the docs about index templates  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html)

But it is being done in CURL. How will I do this in Logstash? TYIA!

---

<div class="post-metadata">

**Author:** ![Shaoranlaos](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@Shaoranlaos](https://discuss.elastic.co/u/Shaoranlaos)\
**Post date:** [January 10, 2019, 12:34pm UTC](https://discuss.elastic.co/t/change-default-shards-in-logstash/163664/2 "2019-01-10T12:34:26Z")

</div>

in the elasticsearch output plugin there is a template config where you can add the template as a file which you would have otherwise send via curl

[https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-template](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-template)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 7, 2019, 12:34pm UTC](https://discuss.elastic.co/t/change-default-shards-in-logstash/163664/3 "2019-02-07T12:34:32Z")

</div>

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