0Pricing
System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) · Lekcja

Index Lifecycle Management (ILM)

Opanują Państwo Index Lifecycle Management, aby automatyzować rollover, architekturę hot-warm-cold i retencję, utrzymując wysoką wydajność indeksów logów oraz kontrolując wykorzystanie pamięci masowej.

Index Lifecycle Management (ILM) to bezpłatna lekcja System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) na CoddyKit. To lekcja 4 z 4. Możesz przeczytać całą lekcję poniżej za darmo — a potem ćwiczyć ją interaktywnie w przeglądarce z wbudowanym edytorem kodu i tutorem AI dostępnym 24/7. To część ścieżki edukacyjnej System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry), a Twój postęp synchronizuje się między webem a aplikacją CoddyKit. Kurs System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) zawiera 4 lekcji w sumie.

Części tej lekcji nie zostały jeszcze przetłumaczone i są wyświetlane po angielsku.

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.

Często zadawane pytania

Czy lekcja „Index Lifecycle Management (ILM)” jest bezpłatna?

Tak — pełny tekst „Index Lifecycle Management (ILM)” jest dostępny za darmo tutaj w sieci. Aby ćwiczyć ją interaktywnie (wbudowany edytor kodu i tutor AI dostępny 24/7) i odblokować resztę kursu System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry), przejdź na CoddyKit PRO. Kurs System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) zawiera 4 lekcji w sumie.

Co nauczysz się w „Index Lifecycle Management (ILM)”?

Opanują Państwo Index Lifecycle Management, aby automatyzować rollover, architekturę hot-warm-cold i retencję, utrzymując wysoką wydajność indeksów logów oraz kontrolując wykorzystanie pamięci masowe… Ćwiczysz System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) z praktycznym kodem, który uruchamiasz bezpośrednio w przeglądarce, a tutor AI dostępny 24/7 odpowiada na Twoje pytania podczas pracy nad lekcją.

Czy potrzebuję doświadczenia, aby zacząć System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry)?

Nie wymagamy żadnego doświadczenia. System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) w CoddyKit jest strukturyzowany dla początkujących i zaawansowanych użytkowników, więc możesz zacząć tutaj lub od początku i uczyć się w swoim tempie. To lekcja 4 z 4.

Ile czasu zajmuje lekcja „Index Lifecycle Management (ILM)”?

Większość lekcji CoddyKit trwa około 5–10 minut. Każda lekcja to mały, interaktywny krok, dzięki czemu robisz systematyczne postępy i zawsze wracasz dokładnie do tego samego miejsca — na webie i w aplikacji.

Czy mogę pisać i uruchamiać kod w tej lekcji System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry)?

Tak. Każda lekcja System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) zawiera wbudowany edytor kodu, więc piszesz i uruchamiasz prawdziwy kod bezpośrednio w przeglądarce i od razu otrzymujesz sprzężenie zwrotne od AI — bez konfiguracji na komputerze.

Wszystkie lekcje w tym kursie

  1. Język zapytań Elasticsearch (DSL)
  2. Filtry i potoki Logstash
  3. Kibana Discover i Lens
  4. Index Lifecycle Management (ILM)
← Powrót do System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry)