# How to change the system indices template

**URL:** <https://discuss.elastic.co/t/how-to-change-the-system-indices-template/148807>\
**Category:** Elasticsearch\
**Created:** [September 17, 2018, 9:57am UTC](https://discuss.elastic.co/t/how-to-change-the-system-indices-template/148807 "2018-09-17T09:57:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sivap](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sivap](https://discuss.elastic.co/u/sivap)\
**Post date:** [September 17, 2018, 9:57am UTC](https://discuss.elastic.co/t/how-to-change-the-system-indices-template/148807/1 "2018-09-17T09:57:52Z")

</div>

Hi Team,  
I'm trying to change the System Indices template which is generating on a daily basis. As mentioned in the elastic blocks, already am using the below-mentioned common template.

curl -XPUT "[http://localhost:9200/\_template/template2](http://localhost:9200/_template/template2)" -H 'Content-Type: application/json' -d' {  
**"index\_patterns" : ["\*"],**  
"settings": {  
"index.number\_of\_shards": 2,  
"index.number\_of\_replicas": 0  
}  
}'

But, It's not working for the below-listed system indices.😔  
.ml-anomalies-custom  
.ml-anomalies-custom-store\_appication  
.monitoring-es-6-2018.09.16  
.monitoring-logstash-6-2018.09.17   
.ml-state

Could someone please help me to fix this.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [September 17, 2018, 8:24pm UTC](https://discuss.elastic.co/t/how-to-change-the-system-indices-template/148807/2 "2018-09-17T20:24:55Z")

</div>

Please use the [order setting](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html#multiple-templates)  
If you get full output of "GET \_template"; you will find there are already templates with "order" : 0 for the indices you mentioned. So you should set the highest order value gets merged last (example "order": 1)  
Thanks

---

<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:** [September 17, 2018, 10:37pm UTC](https://discuss.elastic.co/t/how-to-change-the-system-indices-template/148807/3 "2018-09-17T22:37:56Z")

</div>

Why would you want 2 shards but no replicas for these, they're system critical ones?

---

<div class="post-metadata">

**Author:** ![sivap](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sivap](https://discuss.elastic.co/u/sivap)\
**Post date:** [September 18, 2018, 2:11pm UTC](https://discuss.elastic.co/t/how-to-change-the-system-indices-template/148807/4 "2018-09-18T14:11:36Z")

</div>

@Julien - Thanks for your response.  
I will try with "order" in template.

Thanks  
Siva

---

<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:** [October 16, 2018, 2:11pm UTC](https://discuss.elastic.co/t/how-to-change-the-system-indices-template/148807/5 "2018-10-16T14:11:41Z")

</div>

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