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

I had put common template like this:

curl -XPUT 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: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' -d '
{
"index" : {
"number_of_replicas" : 0
}
}'
did not work neither.

any idea what happend?

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

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

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

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

:scream::cold_sweat:
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.

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.

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