System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) · درس

إدارة دورة حياة الفهارس (ILM)

أتقن Index Lifecycle Management لأتمتة التدوير، ومعمارية الساخن-الدافئ-البارد، والاحتفاظ، بحيث تظل فهارس السجلات سريعة والتخزين تحت السيطرة.

الدرس 4 من 413 خطوة

إدارة دورة حياة الفهارس (ILM) درس مجاني في System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry)، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

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.

البدء مجانًا

تعلم System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) مع معلم ذكاء اصطناعي — مجانًا

اكتب وقم بتشغيل أكوادك الفعلية في المتصفح، واحصل على مساعدة فورية من معلم ذكاء اصطناعي متاح 24/7، واستمر من حيث توقفت على الويب أو في التطبيق.

الدورات
12
الدروس
48

الأسئلة الشائعة

هل درس «إدارة دورة حياة الفهارس (ILM)» مجاني؟

نعم — نص درس «إدارة دورة حياة الفهارس (ILM)» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry)، انتقل إلى CoddyKit PRO. تتضمن دورة System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 4 دروس في المجموع.

ماذا ستتعلم في «إدارة دورة حياة الفهارس (ILM)»؟

أتقن Index Lifecycle Management لأتمتة التدوير، ومعمارية الساخن-الدافئ-البارد، والاحتفاظ، بحيث تظل فهارس السجلات سريعة والتخزين تحت السيطرة. تتمرن على System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry)؟

لا تُشترط خبرة سابقة. System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.

كم من الوقت يستغرق درس «إدارة دورة حياة الفهارس (ILM)»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) هذا؟

نعم. كل درس في System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. لغة استعلام Elasticsearch (DSL)
  2. مرشّحات ومسارات Logstash
  3. Kibana Discover وLens
  4. إدارة دورة حياة الفهارس (ILM)
← العودة إلى System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry)