# How to config the shard numbers when index created by logstash?

**URL:** <https://discuss.elastic.co/t/how-to-config-the-shard-numbers-when-index-created-by-logstash/109003>\
**Category:** Logstash\
**Created:** [November 24, 2017, 9:53am UTC](https://discuss.elastic.co/t/how-to-config-the-shard-numbers-when-index-created-by-logstash/109003 "2017-11-24T09:53:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sungkeun\_Lee](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Sungkeun\_Lee](https://discuss.elastic.co/u/Sungkeun_Lee)\
**Post date:** [November 24, 2017, 9:53am UTC](https://discuss.elastic.co/t/how-to-config-the-shard-numbers-when-index-created-by-logstash/109003/1 "2017-11-24T09:53:26Z")

</div>

Hi, I am using ELK for collecting log.

Logstash create a index everyday.

Default shard setting is 5, but I wish change that.

How do I have to do?

Please let me know.

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [November 24, 2017, 3:09pm UTC](https://discuss.elastic.co/t/how-to-config-the-shard-numbers-when-index-created-by-logstash/109003/2 "2017-11-24T15:09:16Z")

</div>

1. Read this first: [https://www.elastic.co/blog/logstash\_lesson\_elasticsearch\_mapping](https://www.elastic.co/blog/logstash_lesson_elasticsearch_mapping)

2. Then this: [https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-create-index.html#mappings](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-create-index.html#mappings)

Add the settings to the index mapping from what was specified in link 1).

---

<div class="post-metadata">

**Author:** ![Sungkeun\_Lee](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Sungkeun\_Lee](https://discuss.elastic.co/u/Sungkeun_Lee)\
**Post date:** [November 28, 2017, 7:14am UTC](https://discuss.elastic.co/t/how-to-config-the-shard-numbers-when-index-created-by-logstash/109003/3 "2017-11-28T07:14:31Z")

</div>

Thank you for your answer.

I solved the problem. I refered this link.

[https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-templates.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/indices-templates.html)

---

<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:** [December 26, 2017, 7:15am UTC](https://discuss.elastic.co/t/how-to-config-the-shard-numbers-when-index-created-by-logstash/109003/4 "2017-12-26T07:15:02Z")

</div>

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