# Increase no of shared not working (template update)

**URL:** https://discuss.elastic.co/t/increase-no-of-shared-not-working-template-update/220429
**Category:** Elasticsearch
**Created:** [February 21, 2020, 5:50pm UTC](https://discuss.elastic.co/t/increase-no-of-shared-not-working-template-update/220429 "2020-02-21T17:50:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Senthil\_ak](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@Senthil\_ak](https://discuss.elastic.co/u/Senthil_ak)
#### Post date: [February 21, 2020, 5:50pm UTC](https://discuss.elastic.co/t/increase-no-of-shared-not-working-template-update/220429/1 "2020-02-21T17:50:57Z")

</div>

Hi,  
I have 3 master nodes and 3 data nodes running in elk. Beats sends logs to log stash and then to elk. The index name created from log stash o/p like below.

```
elasticsearch {
  hosts => ["http://host1:9200","http://host2:9200","http://host3:9200"]
  manage_template => false
  index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"

```

Everything work fine, but now the all index are created with number of shards as '1'. I though of increasing it to 2 ~ 3. So by referring the link [template](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html) i created a default file beat template like below. But all my indexes are creating with only one shards and one replicas.

```
{
  "filebeat" : {
    "order" : 0,
    "index_patterns" : [
      "filebeat-*"
    ],
    "settings" : {
      "index" : {
        "number_of_shards" : "3",
        "number_of_replicas" : "1"
      }
    },
    "mappings" : { },
    "aliases" : { }
  }
}

```

How to check what am i doing wrong ?

```
filebeat-7.2.0-2020.02.21 0 r STARTED 2163281 
filebeat-7.2.0-2020.02.21 0 p STARTED 2163276
```

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [February 24, 2020, 9:12am UTC](https://discuss.elastic.co/t/increase-no-of-shared-not-working-template-update/220429/2 "2020-02-24T09:12:20Z")

</div>

Wild guess here: Is there another index template, that also matches the index pattern, that has a higher `order` and thus overwrites this number\_of\_shards setting again?

See [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html#put-index-template-api-query-params](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html#put-index-template-api-query-params)

---

<div class="post-metadata">

### Author: ![Senthil\_ak](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@Senthil\_ak](https://discuss.elastic.co/u/Senthil_ak)
#### Post date: [February 24, 2020, 3:01pm UTC](https://discuss.elastic.co/t/increase-no-of-shared-not-working-template-update/220429/3 "2020-02-24T15:01:20Z")

</div>

Yes you are right, there was a filebeat template and a filebeat-7.2.0 which is causing issues, i deleted both of them and now the default is taking care of the shards.

---

<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: [March 23, 2020, 3:01pm UTC](https://discuss.elastic.co/t/increase-no-of-shared-not-working-template-update/220429/4 "2020-03-23T15:01:20Z")

</div>

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