I want to increase the number_of_replicas for all the .monitoring* index created by x-pack. I realize they are using templates such as .monitoring-es-2.
Do I just create another index /_template/.monitoring-es-3 and that's it? where do I tell x-pack to create index from the new template not the old one? should I delete /_template/.monitoring-es-2 when I created 3?
PUT /_template/.monitoring-es-3
{
"order": 0,
"template": ".monitoring-es-3*",
"settings": {
"number_of_replicas": 4
}
... # all other settings and stuff
}
I just want to increase the reliability of internal indexes. If anything goes wrong, internal indexes should be the last one to cause problem.
For example, let's say I have a data index that has 3 replica, so I should be able to afford losing 3 nodes in the same time. However that's not true because the replica for monitoring indexes are 1, so when 2 nodes go down, we lost shards for monitoring indexes, which causes elasticsearch cluster to be red status, which means we cannot read or write to the whole cluster. Even though our data index has 3 replica, it doesn't help.
Ok, so you need to balance the risk of losing 3 nodes with the cost of extra shards. One of the biggest problems we see with clusters is over-sharding and the resource cost of that.
Also, you should really store Monitoring data in a separate cluster, it's the best way to ensure there is no impact and also means that you can get access to data if your main cluster is unavailable.
The monitor index is relatively small comparing to our data. So we're perfectly fine to increase the replica of the monitoring shard. Increasing replica for that index from 1 to 5 will not impact the cluster size we choose.
For current situation, we're ok to increase the replica for monitoring index.
Interesting. It's very useful actually. But looks like this is dynamic settings so I have to update this setting after the index get created, I was hoping to avoid this manual part. That is why I was looking at the monitoring template.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.