ILM – managing the index life cycle
Index Lifecycle Management (ILM) in Elasticsearch is a system that allows you to set up policies to manage different aspects of your index life, such as the following:
- Manage daily, weekly, and monthly indices with backup, optimization, and movement in the different serving tiers (hot and cold)
- Create and switch to new indices when some indices reach a certain size or number of documents
- Delete obsolete indices at the end of their life
- Delete stale indices to enforce retention standards (that is, General Data Protection Regulation (GDPR) and 3-month retention)
ILM policies can be defined via an API or Kibana (go to Stack Management | Index Lifecycle Policies):
Getting ready
You need an up-and-running Elasticsearch installation, as we described in the Downloading and installing Elasticsearch recipe in Chapter 1...