What is Index Lifecycle Management (ILM) in Elasticsearch?
ILM is a feature in Elasticsearch that automates the management of index lifecycles, such as creation, rollover, and deletion, based on defined policies to optimize storage and performance.
Click to reveal answer
beginner
Name the typical phases in an Elasticsearch ILM policy.
The typical ILM phases are: hot (indexing and searching), warm (less frequent access, optimized for cost), cold (rarely accessed, low cost), and delete (removes old data).
Click to reveal answer
intermediate
What is the purpose of the 'rollover' action in ILM?
The rollover action creates a new index when the current index reaches a size, age, or document count threshold, helping to keep indexes manageable and performant.
Click to reveal answer
intermediate
How does ILM help with storage cost optimization?
ILM moves older indexes to less expensive hardware or storage tiers during the warm and cold phases, reducing storage costs while keeping data accessible if needed.
Click to reveal answer
beginner
What happens during the 'delete' phase in an ILM policy?
During the delete phase, Elasticsearch automatically deletes indexes that are no longer needed, freeing up storage space and keeping the cluster clean.
Click to reveal answer
Which ILM phase is primarily used for active indexing and searching?
Adelete
Bhot
Ccold
Dwarm
✗ Incorrect
The hot phase is where active indexing and searching happen.
What does the rollover action in ILM do?
ADeletes old indexes
BMoves indexes to cold storage
CCreates a new index when thresholds are met
DOptimizes index shards
✗ Incorrect
Rollover creates a new index when size, age, or document count limits are reached.
In which ILM phase are indexes moved to less expensive storage but remain searchable?
Awarm
Bdelete
Chot
Dindexing
✗ Incorrect
The warm phase moves indexes to cheaper storage while keeping them searchable.
What is the main goal of the delete phase in ILM?
AFree up storage by removing old indexes
BImprove search speed
CCreate new indexes
DMove data to hot storage
✗ Incorrect
The delete phase removes old indexes to free storage space.
Which of the following is NOT a typical ILM phase?
Acold
Bwarm
Chot
Dfreeze
✗ Incorrect
Freeze is not a standard ILM phase; the main phases are hot, warm, cold, and delete.
Explain the purpose and benefits of using Index Lifecycle Management in Elasticsearch.
Think about how ILM helps manage data as it ages.
You got /5 concepts.
Describe the rollover action and when it is triggered in an ILM policy.
Consider what happens when an index gets too big or old.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of Index Lifecycle Management (ILM) in Elasticsearch?
easy
A. To automate index handling and improve cluster performance
B. To manually create indexes for each data type
C. To backup data to external storage
D. To encrypt index data for security
Solution
Step 1: Understand ILM's role
ILM automates managing indexes through their lifecycle phases.
Step 2: Identify the benefit
Automation helps save space and improves cluster health and performance.
Final Answer:
To automate index handling and improve cluster performance -> Option A
Quick Check:
ILM automates index management = A [OK]
Hint: ILM automates index tasks to keep Elasticsearch healthy [OK]
Common Mistakes:
Thinking ILM is for manual index creation
Confusing ILM with backup or encryption
Assuming ILM only deletes indexes
2. Which of the following is the correct way to define a rollover action in an ILM policy JSON?
easy
A. "rollover": { "max_size": "50gb", "max_age": "30d" }
B. "rollover": "true"
C. "rollover": { "size": "50gb" }
D. "rollover": { "max_documents": 1000 }
Solution
Step 1: Check rollover action syntax
Rollover requires conditions like max_size and max_age in a JSON object.
Step 2: Validate options
"rollover": { "max_size": "50gb", "max_age": "30d" } correctly uses max_size and max_age keys with proper values.
Final Answer:
"rollover": { "max_size": "50gb", "max_age": "30d" } -> Option A
Quick Check:
Rollover needs max_size and max_age keys = A [OK]
Hint: Rollover needs max_size and max_age keys in JSON [OK]
Common Mistakes:
Using string 'true' instead of object for rollover
After applying, the shrink action never runs. What is the likely cause?
medium
A. Rollover max_size is too small
B. Shrink action requires delete phase
C. Shrink action must be in hot phase
D. The index has not reached 10 days old yet
Solution
Step 1: Check warm phase min_age
Shrink runs only after index is at least 10 days old.
Step 2: Confirm index age
If index age is less than 10 days, shrink won't trigger yet.
Final Answer:
The index has not reached 10 days old yet -> Option D
Quick Check:
min_age controls action timing = C [OK]
Hint: Check min_age before expecting warm phase actions [OK]
Common Mistakes:
Assuming shrink needs delete phase
Changing rollover size unrelated to shrink
Placing shrink in wrong phase
5. You want to create an ILM policy that: - Rolls over an index at 30GB or 15 days - Moves the index to warm phase after rollover - Deletes the index 60 days after rollover
Which policy configuration correctly implements this?