# Index template

**URL:** https://discuss.elastic.co/t/index-template/259161
**Category:** Elasticsearch
**Created:** [December 19, 2020, 2:41pm UTC](https://discuss.elastic.co/t/index-template/259161 "2020-12-19T14:41:36Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Norman\_Khine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/norman_khine/32/3342_2.png) [@Norman\_Khine](https://discuss.elastic.co/u/Norman_Khine)
#### Post date: [December 19, 2020, 2:41pm UTC](https://discuss.elastic.co/t/index-template/259161/1 "2020-12-19T14:41:36Z")

</div>

Hello, i have the following template for one of my indexes:

```auto
PUT _template/template_analytics-prod
{
  "index_patterns": [
    "analytics-prod-*"
  ],
  "settings": {
    "number_of_shards": 2,
    "number_of_replicas": 1,
    "auto_expand_replicas": false
  }
}

```

but when i look at new indexes being created they still have 5 shards, for example:

```auto
curl -X GET 'http://localhost/_cat/indices/*?bytes=b&v&index=index_name&h=index,docs.count,store.size,pri.store.size,pri' | awk 'NR<3{print $0;next}{print $0| "sort -r"}' | grep 'analytics-prod-2020.12.19'

analytics-prod-2020.12.19 243355 563717328 299907775 5

```

what am i missing?

any advice is much appreciated

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [December 19, 2020, 3:07pm UTC](https://discuss.elastic.co/t/index-template/259161/2 "2020-12-19T15:07:12Z")

</div>

Which tool/app is creating the index?

What happen if you run:

```
PUT /analytics-prod-test 

```

?

---

<div class="post-metadata">

### Author: ![Norman\_Khine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/norman_khine/32/3342_2.png) [@Norman\_Khine](https://discuss.elastic.co/u/Norman_Khine)
#### Post date: [December 21, 2020, 1:20am UTC](https://discuss.elastic.co/t/index-template/259161/3 "2020-12-21T01:20:56Z")

</div>

> [@dadoonet](#):
>
> `PUT /analytics-prod-test `

I get

```auto
{
  "acknowledged" : true,
  "shards_acknowledged" : true,
  "index" : "analytics-prod-test"
}

```

then `GET /analytics-prod-test/_stats` returns

```auto
{
  "_shards" : {
    "total" : 10,
    "successful" : 10,
    "failed" : 0
  },
...
}

```

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [December 21, 2020, 3:01am UTC](https://discuss.elastic.co/t/index-template/259161/4 "2020-12-21T03:01:54Z")

</div>

What is the out from this API [https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html)

---

<div class="post-metadata">

### Author: ![Norman\_Khine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/norman_khine/32/3342_2.png) [@Norman\_Khine](https://discuss.elastic.co/u/Norman_Khine)
#### Post date: [December 22, 2020, 2:45pm UTC](https://discuss.elastic.co/t/index-template/259161/5 "2020-12-22T14:45:30Z")

</div>

```auto
template_aws-elb-2020.11 [aws-elb-2020.11] 0 
analytics-2020.04 [analytics-2020.04] 0 
analytics-2020.05 [analytics-2020.05] 0 
.kibana_task_manager [.kibana_task_manager] 0 7010199
template_elbv2 [aws-elbv2-*] 0 
apm-6.5.3 [apm-6.5.3-*] 1 
template_apigw [aws-apigw-*] 0 
.management-beats [.management-beats] 0 70000
template_analytics-prod [analytics-prod-*] 0 
template_aws-elb-2020.10 [aws-elb-2020.10] 0 

```

---

<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: [January 19, 2021, 2:45pm UTC](https://discuss.elastic.co/t/index-template/259161/6 "2021-01-19T14:45:39Z")

</div>

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