How to change the system indices template


(sivakumar) #1

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" -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.:pensive:
.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.


(Julien) #2

Please use the order setting
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


(Mark Walkom) #3

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


(sivakumar) #4

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

Thanks
Siva


(system) #5

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