原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/config-monitoring-indices.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/config-monitoring-indices.html
本地英文版地址: ../en/config-monitoring-indices.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Configuring indices for monitoringedit
Index templates are used to configure the indices that store the monitoring data collected from a cluster.
You can retrieve the templates through the _template API:
GET /_template/.monitoring-*
By default, the template configures one shard and one replica for the monitoring indices. To override the default settings, add your own template:
-
Set the
templatepattern to.monitoring-*. -
Set the template
orderto1. This ensures your template is applied after the default template, which has an order of 0. -
Specify the
number_of_shardsand/ornumber_of_replicasin thesettingssection.
For example, the following template increases the number of shards to five and the number of replicas to two.
PUT /_template/custom_monitoring
{
"index_patterns": ".monitoring-*",
"order": 1,
"settings": {
"number_of_shards": 5,
"number_of_replicas": 2
}
}
Only set the number_of_shards and number_of_replicas in the
settings section. Overriding other monitoring template settings could cause
your monitoring dashboards to stop working correctly.