RousselTMLEARNING

Article · Elasticsearch: from discovery to expertise

Index Lifecycle Management (ILM)

1. The phases #

Data that ages.

Lifecycle #

Phases of an ILM policy
PhaseTypical actionsNodes
hotrollover, high prioritydata_hot (SSD)
warmshrink, forcemerge, read-onlydata_warm
coldfewer replicas, searchable snapshot (depending on license)data_cold
frozenpartial searchable snapshotdata_frozen + object repository
deletedeletion, possibly after a snapshot-

2. A policy #

In practice.

Policy and diagnosis #

PUT _ilm/policy/logs-30d
{
  "policy": {
    "phases": {
      "hot":    { "actions": { "rollover": { "max_primary_shard_size": "50gb", "max_age": "1d" } } },
      "warm":   { "min_age": "7d",  "actions": { "shrink": { "number_of_shards": 1 }, "forcemerge": { "max_num_segments": 1 } } },
      "delete": { "min_age": "30d", "actions": { "delete": {} } }
    }
  }
}

GET logs-nginx-default/_ilm/explain        # phase et étape de chaque index, erreurs éventuelles
Good to know: min_age counts from the index rollover, not from its creation: a « 7-day » index in warm was written for 1 day and then aged 7 days.
Common mistake: Without rollover, the age of a huge index does not change: ILM does nothing useful. Rollover (via a data stream or a write alias) is the foundation of everything else.
Good to know: Some features depend on the version and the license level (Basic, Platinum, Enterprise): check them in the documentation and on the Elastic subscriptions page before using them in production.

📄 Index Lifecycle Management (ILM): data tiers, rollover and retention →

My progress

  • ⏱ Estimated time : ≈ 3 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Recent discussions about this course

Ask a question about this lesson →See all discussions about this course

Course Glossary

RBAC (Role-Based Access Control)

An access control method where permissions are assigned to specific roles (e.g., admin, reader) rather than directly to individual users.

Authentication

The process of verifying the identity of a user or system (e.g., login/password, tokens, biometrics).

Authorization

The process that occurs after authentication to determine if the entity has the necessary rights and privileges to access a resource.

API Key

A unique alphanumeric code used to identify, authenticate, and authorize access to an Application Programming Interface (API).

Architecture

The overall structural design of an IT system, defining its various components, their relationships, and the principles guiding its evolution.

Repository

A centralized storage location. This can refer to a source code repository (e.g., Git) or an artifact and binary repository (e.g., Harbor, Nexus, Arti...

Elasticsearch

A distributed, RESTful search and analytics engine capable of addressing a growing number of use cases, built on Apache Lucene.

Recommended Articles

Elasticsearch best practices: mappings, shards, lifecycle and operations

Elasticsearch best practices: shard sizing, explicit mappings, templates, ILM, JVM memory, securi...

Elasticsearch data streams and templates: component templates, index templates and time series

Manage timestamped data with data streams: index templates and component templates, the type-data...

Snapshot Lifecycle Management: automated backups, restore and disaster recovery

Protect Elasticsearch data: snapshot repositories (S3, GCS, Azure, file system), SLM policies wit...

Elasticsearch ingestion: Bulk API, ingest pipelines, enrich and reindex

Ingest and transform data in Elasticsearch: Bulk API, ingest pipelines and processors (grok, diss...

Elasticsearch monitoring and troubleshooting: health, unassigned shards, JVM, hot threads and slow logs

Diagnose an Elasticsearch cluster: cluster health and CAT APIs, unassigned shards and allocation ...

Transforms and enrich: summarising and enriching data in Elasticsearch

Build entity-centric indices with pivot and latest transforms, and enrich documents at ingest tim...

Elasticsearch mappings and text analysis: field types, analyzers and dynamic mapping

Master Elasticsearch mappings: field types (text, keyword, numeric, date, ip, nested), multi-fiel...

Automation and infrastructure as code for Elasticsearch: API, Terraform, Ansible and CI/CD

Automate Elasticsearch administration: REST API and clients, the elasticstack Terraform provider ...

Advanced Elasticsearch security: TLS, certificates, API keys, FLS, DLS and audit

Secure Elasticsearch in depth: transport and HTTP TLS, certificate management with elasticsearch-...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!