# .monitoring-es-\* index shards and replicas number fail to match any template

**URL:** https://discuss.elastic.co/t/monitoring-es-index-shards-and-replicas-number-fail-to-match-any-template/95275
**Category:** Elasticsearch
**Created:** [August 1, 2017, 4:05am UTC](https://discuss.elastic.co/t/monitoring-es-index-shards-and-replicas-number-fail-to-match-any-template/95275 "2017-08-01T04:05:28Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![John\_ax](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@John\_ax](https://discuss.elastic.co/u/John_ax)
#### Post date: [August 1, 2017, 4:05am UTC](https://discuss.elastic.co/t/monitoring-es-index-shards-and-replicas-number-fail-to-match-any-template/95275/1 "2017-08-01T04:05:28Z")

</div>

I had put common template like this:

> curl -XPUT [http://locahost](http://locahost):xxx/\_template/t1 '-d{"template" : "\*","order" : 0,"settings": {"index.refresh\_interval": "1m","number\_of\_shards": "36","number\_of\_replicas" : 0}'

t1 works for all the index except .monitoring-es-_, .monitoring-es-_ still have one shards and one replicas. so I add this template:

> curl -XPUT [http://localhost](http://localhost):xxx/\_template/t2 '-d{"template" : ".monitoring\*","order" : 0,"settings": {"index.refresh\_interval": "1m","number\_of\_shards": "36","number\_of\_replicas" : 0}}'

and delelte .monitoring-es-08.01,but the new created .monitoring-es index still have one shards and one replicas.  
then I try this:

> curl -XPUT '[http://localhost:9200/\_settings](http://localhost:9200/_settings)' -d '  
> {  
> "index" : {  
> "number\_of\_replicas" : 0  
> }  
> }'  
> did not work neither.

any idea what happend?

---

<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: [August 1, 2017, 6:00am UTC](https://discuss.elastic.co/t/monitoring-es-index-shards-and-replicas-number-fail-to-match-any-template/95275/2 "2017-08-01T06:00:58Z")

</div>

> [@John\_ax](#):
>
> “number\_of\_shards”: “36”

Why do you have so many shards? And no replicas?

---

<div class="post-metadata">

### Author: ![John\_ax](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@John\_ax](https://discuss.elastic.co/u/John_ax)
#### Post date: [August 1, 2017, 8:25am UTC](https://discuss.elastic.co/t/monitoring-es-index-shards-and-replicas-number-fail-to-match-any-template/95275/3 "2017-08-01T08:25:45Z")

</div>

> [@warkolm](#):
>
> shards

I have many nodes, and didn't need the replicas.but why template and setting didn't work for .monitoring-es-\* index?

---

<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: [August 1, 2017, 10:07pm UTC](https://discuss.elastic.co/t/monitoring-es-index-shards-and-replicas-number-fail-to-match-any-template/95275/4 "2017-08-01T22:07:37Z")

</div>

Because the monitoring template has a closer match so will override this one.

> [@John\_ax](#):
>
> have many nodes, and didn’t need the replicas

You're going to run into multiple problems with this.

---

<div class="post-metadata">

### Author: ![John\_ax](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@John\_ax](https://discuss.elastic.co/u/John_ax)
#### Post date: [August 2, 2017, 3:22am UTC](https://discuss.elastic.co/t/monitoring-es-index-shards-and-replicas-number-fail-to-match-any-template/95275/5 "2017-08-02T03:22:41Z")

</div>

> [@warkolm](#):
>
> You’re going to run into multiple problems with this.

😱😰  
any suggestion? people said without any replicas,ES cluster can have higher performance. and one node two shards for a index may help scale the cluster.

---

<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: [August 2, 2017, 9:42am UTC](https://discuss.elastic.co/t/monitoring-es-index-shards-and-replicas-number-fail-to-match-any-template/95275/6 "2017-08-02T09:42:37Z")

</div>

The monitoring data does not warrant 36 shards, it only needs 1. You only really need that many shards if you are running TB sized indices.

If you run without any replicas you **will lose data if you lose a node**. All the performance in the world won't help if you can't even use the data.

---

<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: [August 30, 2017, 9:42am UTC](https://discuss.elastic.co/t/monitoring-es-index-shards-and-replicas-number-fail-to-match-any-template/95275/7 "2017-08-30T09:42:46Z")

</div>

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