System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) · Lezione

Index Lifecycle Management (ILM)

Padroneggi Index Lifecycle Management per automatizzare rollover, architettura hot-warm-cold e conservazione, mantenendo veloci gli indici dei log e sotto controllo lo spazio di archiviazione.

Lezione 4 di 413 passaggi

Index Lifecycle Management (ILM) è una lezione System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) gratuita su CoddyKit. Questa è la lezione 4 di 4. Puoi leggere la lezione completa qui gratuitamente — poi esercitati direttamente nel browser con un editor di codice integrato e un tutor IA disponibile 24/7. Fa parte del percorso di apprendimento System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry), e i tuoi progressi si sincronizzano tra il web e l'app CoddyKit. Il corso System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) include 4 lezioni in totale.

Parti di questa lezione non sono ancora state tradotte e vengono mostrate in inglese.

Why Manage Index Lifecycle?

Time-series data like logs grows endlessly. Index Lifecycle Management (ILM) automates moving, shrinking, and deleting indices so old data does not crush your cluster.

Rollover

Rollover creates a new index when the current one hits a size, age, or document count threshold. Writes always go to a single alias.

rollover:
  max_size: 50gb
  max_age: 1d
  max_docs: 100000000

Write Aliases

Apps write to an alias such as logs-write. ILM swaps which physical index the alias points to on rollover, invisible to the writer.

POST logs-write/_doc
{ "message": "..." }

The Phases

ILM defines lifecycle phases a data ages through.

  • Hot: actively written and queried
  • Warm: read-only, queried less
  • Cold: rarely queried, cheap storage
  • Delete: removed

Hot Phase

The hot phase lives on the fastest nodes with the most resources, handling all writes and recent queries.

phases:
  hot:
    actions:
      rollover: { max_age: 1d }

Warm Phase

In warm, indices become read-only and may move to cheaper nodes. You can shrink shards and force-merge segments to save space.

warm:
  min_age: 7d
  actions:
    forcemerge: { max_num_segments: 1 }
    shrink: { number_of_shards: 1 }

Cold and Frozen

Cold data moves to the cheapest disks; frozen can be searched directly from object storage. Both trade query speed for cost.

cold:
  min_age: 30d
  actions:
    allocate: { require: { data: cold } }

Delete Phase

The delete phase enforces retention by removing indices past a chosen age, the simplest way to cap storage growth.

delete:
  min_age: 90d
  actions:
    delete: {}

Attaching a Policy

An index template binds new indices to an ILM policy and the write alias automatically.

PUT _index_template/logs
{ "template": { "settings": {
  "index.lifecycle.name": "logs-policy" } } }

Node Roles

Hot-warm-cold relies on node attributes so allocation actions can route shards to the right hardware tier.

node.attr.data: hot   # on fast nodes
node.attr.data: cold  # on cheap nodes

Putting It Together

A typical logging policy: roll over daily in hot, move to warm and force-merge after a week, go cold after a month, and delete after ninety days.

Quick Check

Pick the phase that enforces retention.

Recap

You learned how ILM automates index management: rollover starts fresh indices behind a write alias, and the hot-warm-cold-delete phases move data to cheaper tiers as it ages and finally remove it. Index templates bind policies automatically, keeping clusters fast and storage bounded.

Gratis per iniziare

Impara System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) con un tutor IA — gratis

Scrivi ed esegui vero codice nel tuo browser, ricevi aiuto istantaneo da un tutor IA disponibile 24/7, e riprendi da dove hai lasciato sul web o nell'app.

Corsi
12
Lezioni
48

Domande Frequenti

La lezione «Index Lifecycle Management (ILM)» è gratuita?

Sì — il testo completo di «Index Lifecycle Management (ILM)» è gratuito qui sul web. Per esercitarvi in modo interattivo (un editor di codice integrato e un tutor IA 24/7) e sbloccare il resto del corso System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry), passa a CoddyKit PRO. Il corso System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) include 4 lezioni in totale.

Cosa imparerò in «Index Lifecycle Management (ILM)»?

Padroneggi Index Lifecycle Management per automatizzare rollover, architettura hot-warm-cold e conservazione, mantenendo veloci gli indici dei log e sotto controllo lo spazio di archiviazione. Eserciti System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) con codice pratico che esegui direttamente nel browser, e un tutor IA 24/7 risponde alle tue domande mentre lavori sulla lezione.

Ho bisogno di esperienza per iniziare System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry)?

Non è richiesta alcuna esperienza precedente. System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) su CoddyKit è strutturato per principianti e studenti avanzati, quindi puoi iniziare da qui o dall'inizio e procedere al tuo ritmo. Questa è la lezione 4 di 4.

Quanto tempo richiede la lezione «Index Lifecycle Management (ILM)»?

La maggior parte delle lezioni CoddyKit richiede circa 5–10 minuti. Ogni lezione è breve e interattiva, quindi fai progressi costanti e riprendi esattamente da dove hai lasciato su web e app.

Posso scrivere ed eseguire codice in questa lezione System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry)?

Sì. Ogni lezione System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) include un editor di codice integrato, quindi scrivi ed esegui codice reale direttamente nel tuo browser e ricevi feedback istantaneo dall'IA — nessuna configurazione locale necessaria.

Tutte le lezioni di questo corso

  1. Linguaggio di query di Elasticsearch (DSL)
  2. Filtri e pipeline di Logstash
  3. Discover e Lens di Kibana
  4. Index Lifecycle Management (ILM)
← Torna a System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry)