# Edit default logstash index template

**URL:** <https://discuss.elastic.co/t/edit-default-logstash-index-template/236682>\
**Category:** Logstash\
**Created:** [June 11, 2020, 10:49am UTC](https://discuss.elastic.co/t/edit-default-logstash-index-template/236682 "2020-06-11T10:49:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![FabioAntunes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fabioantunes/32/70133_2.png) [@FabioAntunes](https://discuss.elastic.co/u/FabioAntunes)\
**Post date:** [June 11, 2020, 10:49am UTC](https://discuss.elastic.co/t/edit-default-logstash-index-template/236682/1 "2020-06-11T10:49:13Z")

</div>

Hey folks, been going back and forth on documentation and discuss topics. Unfortunately, I couldn't found a solution to my problem.

I have a default index template for logstash, if I do `GET /_template/elasticsearch-template-es5x.json`

I can see that by default it will create an index with 20 shards.  
My idea was to reduce this to 1.

So I did:

```
PUT /_template/elasticsearch-template-es5x.json?pretty
{
    "index_patterns" : ["logstash-*"],
    "settings": {
      "number_of_shards": 1
    }
}

```

Which gives a beautiful response of:

```
{
  "acknowledged" : true
}

```

But if get our template again `GET /_template/elasticsearch-template-es5x.json`, it still says 20 shards.

Now the question is how can I edit this? Do I need to create a new template with the same specs? Will that overwrite this default template? Do I need to somehow edit the file somewhere, because elastic is loading the file from the disk?

---

<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:** [July 9, 2020, 10:49am UTC](https://discuss.elastic.co/t/edit-default-logstash-index-template/236682/2 "2020-07-09T10:49:18Z")

</div>

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