Interview Prep/Monitoring & Observability/Logging: ELK/EFK, Loki & Log Shippers

What is ILM (Index Lifecycle Management) and why do log clusters need it?

IntermediateConceptLogging: ELK/EFK, Loki & Log Shippers
Answer

ILM moves indexes through phases automatically: hot (active writes, fast disks) to warm (read-only, fewer replicas) to cold/frozen (cheap storage or searchable snapshots) to delete.

{"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":{}}}}}}

Combined with data streams, it prevents oversized shards and disks filling up.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging: ELK/EFK, Loki & Log Shippers