The indices.lifecycle.history_index_enabled
setting controls whether Elasticsearch creates and manages the Index Lifecycle Management (ILM) history index. This index is used to log events related to index lifecycle policies.
- Default value:
true
- Possible values:
true
orfalse
- Recommendation: Keep the default value unless you have specific reasons to disable it
When enabled, Elasticsearch maintains an index named .ilm-history-*
to store information about ILM policy executions, including successes, failures, and other relevant events. This can be valuable for auditing and troubleshooting purposes.
Example
To disable the ILM history index:
PUT _cluster/settings
{
"persistent": {
"indices.lifecycle.history_index_enabled": false
}
}
Reason for changing: You might want to disable this setting if you're not actively using ILM or if you want to reduce the storage overhead associated with maintaining the history index.
Effects of the change: Disabling this setting will stop Elasticsearch from creating new ILM history indices and logging ILM events. Existing history indices will not be automatically deleted.
Common Issues or Misuses
- Disabling this setting without understanding its implications can make it harder to troubleshoot ILM-related issues.
- Enabling this setting in environments with very high ILM activity might lead to increased storage usage.
Do's and Don'ts
Do's:
- Keep this setting enabled if you're actively using ILM policies.
- Regularly monitor the size of the
.ilm-history-*
indices to ensure they don't consume excessive storage.
Don'ts:
- Don't disable this setting unless you have a specific reason and understand the implications.
- Don't ignore the ILM history index when investigating ILM-related issues.
Frequently Asked Questions
Q: Can I delete old ILM history indices to save space?
A: Yes, you can use ILM itself to manage the lifecycle of the ILM history indices. Elasticsearch automatically applies a policy to retain 30 days of history by default.
Q: How can I view the contents of the ILM history index?
A: You can query the .ilm-history-*
indices using the standard Elasticsearch query DSL. For example: GET /.ilm-history-*/_search
Q: Does disabling this setting affect existing ILM policies?
A: No, disabling this setting only stops the logging of ILM events. Existing policies will continue to function normally.
Q: Can I re-enable the ILM history index after disabling it?
A: Yes, you can re-enable it at any time by setting indices.lifecycle.history_index_enabled
to true
. Elasticsearch will start creating new history indices from that point forward.
Q: How much storage does the ILM history index typically use?
A: The storage usage depends on the number of indices managed by ILM and the frequency of lifecycle events. In most cases, it's relatively small compared to your data indices, but it's good practice to monitor its growth over time.