This topic describes how to create and manage index lifecycle policies for Elasticsearch clusters.
Index State Management (ISM) of Elasticsearch is a plugin that allows you to automate periodic, administrative operations on indexes by triggering them based on changes in the index age, index size, or number of documents. With ISM, you can define custom policies to automate index rollovers and deletion, thus optimizing cluster search performance or cutting storage costs. The procedure for using ISM is as follows:
For more information about ISM, see Index State Management.
Figure 1 Configuring a policy

You can attach a policy to one or more indexes, or associate a policy with an index template, so that the policy will be applied to all indexes created using this index template.
Use either of the following methods to associate a lifecycle policy with an index.
On the Dev Tools page of Kibana, run the following command to associate a policy ID with an index template:
PUT _template/<template_name>{"index_patterns": ["index_name-*"],"settings": {"opendistro.index_state_management.policy_id": "policy_id"}}
For details about how to create an index template, see Index Template.
Figure 2 Choosing Indices

Figure 3 Adding an index policy

Figure 4 Selecting a policy

After you bind a policy to an index, ISM creates a job that runs every 5 minutes by default to execute the policy, check criteria, and change index states.
The displayed page shows index policies configured for the current cluster.
For details, see Index State Management.