Configuring stack monitoring indices created by legacy collection
The Elasticsearch Monitoring plugin is deprecated and will be removed in 10.0. Choose one of the following replacements to monitor your Elasticsearch cluster:
- AutoOps (recommended): Simplifies cluster management through performance recommendations, resource utilization visibility, and real-time issue detection with resolution paths.
- Stack monitoring with Elastic Agent or Metricbeat: Collect logs and metrics from Elasticsearch and ship them to a monitoring cluster for visualization in Kibana.
To help you decide, refer to the AutoOps and Stack Monitoring comparison.
To configure the data streams created by Elastic Agent or Metricbeat, refer to Configuring stack monitoring data streams and indices.
When monitoring using internal or legacy collection, data is stored in a set of indices called .monitoring-{{product}}-7-{{date}}. Internal collection is available for Elasticsearch, Kibana, and Beats.
The 7 in the index name is the monitoring template version.
Indices created by Metricbeat 7 are called .monitoring-{{product}}-7-mb-{{date}}. If you still have these indices from an earlier version, the same templates and steps apply to them.
The settings and mappings for these indices are determined by legacy index templates named .monitoring-{{product}}.
You can retrieve these templates in Kibana. To manage index templates, go to the Index Management management page in the navigation menu or use the global search field, and then select Index Templates,
You can also use the Elasticsearch _template API:
GET /_template/.monitoring-*
To change the settings of the indices, add a custom index template. You can do that in Kibana, or using the Elasticsearch API:
- Set
index_patternsto match the.monitoring-{{product}}-7-*indices. - 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.
PUT /_template/custom_monitoring
{
"index_patterns": [".monitoring-beats-7-*", ".monitoring-es-7-*", ".monitoring-kibana-7-*", ".monitoring-logstash-7-*"],
"order": 1,
"settings": {
"number_of_shards": 5,
"number_of_replicas": 2
}
}
After changing the index template, the updated settings are only applied to new indices.