Clusters of versions 7.6.2, 7.9.3 and 7.10.2 support index status management (ISM). ISM is a plugin that allows you to automate periodic and administrative operations based on changes on the index age, index size, or number of documents. When using the ISM plug-in, you can define policies that automatically handle index rolleovers or deletions based on your needs.
The following procedure uses Kibana 7.6.2 as an example. The Kibana UI varies depending on the Kibana version, but their operations are similar.
After you create a policy, attach the policy to one or more indices. You can also include policy_id in an index template, so when you create an index that matches the index template pattern, the policy is attached to the index.
For details about how to create an index template, see Index Templates.
PUT _template/<template_name> { "index_patterns": [ "index_name-*" ], "settings": { "opendistro.index_state_management.policy_id": "policy_id" } }
After you attach a policy to an index, ISM creates a job that runs every five minutes by default, to execute the policy, check conditions, and convert the index to different statuses.
For details, see Index State Management.