ilm-overview.asciidoc 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[overview-index-lifecycle-management]]
  4. == {ilm-init} overview
  5. ++++
  6. <titleabbrev>Overview</titleabbrev>
  7. ++++
  8. You can create and apply {ilm-cap} ({ilm-init}) policies to automatically manage your indices
  9. according to your performance, resiliency, and retention requirements.
  10. Index lifecycle policies can trigger actions such as:
  11. * **Rollover**: Creates a new write index when the current one reaches a certain
  12. size, number of docs, or age.
  13. * **Shrink**: Reduces the number of primary shards in an index.
  14. * **Force merge**: Triggers a <<indices-forcemerge,force merge>> to reduce the
  15. number of segments in an index's shards.
  16. * **Freeze**: <<freeze-index-api, Freezes>> an index and makes it read-only.
  17. * **Delete**: Permanently remove an index, including all of its data and
  18. metadata.
  19. {ilm-init} makes it easier to manage indices in hot-warm-cold architectures,
  20. which are common when you're working with time series data such as logs and metrics.
  21. You can specify:
  22. * The maximum shard size, number of documents, or age at which you want to roll over to a new index.
  23. * The point at which the index is no longer being updated and the number of
  24. primary shards can be reduced.
  25. * When to force a merge to permanently remove documents marked for deletion.
  26. * The point at which the index can be moved to less performant hardware.
  27. * The point at which the availability is not as critical and the number of
  28. replicas can be reduced.
  29. * When the index can be safely deleted.
  30. For example, if you are indexing metrics data from a fleet of ATMs into
  31. Elasticsearch, you might define a policy that says:
  32. . When the total size of the index's primary shards reaches 50GB, roll over to a new
  33. index.
  34. . Move the old index into the warm phase, mark it read only, and shrink it down
  35. to a single shard.
  36. . After 7 days, move the index into the cold phase and move it to less expensive
  37. hardware.
  38. . Delete the index once the required 30 day retention period is reached.
  39. [IMPORTANT]
  40. ===========================
  41. To use {ilm-init}, all nodes in a cluster must run the same version.
  42. Although it might be possible to create and apply policies in a mixed-version cluster,
  43. there is no guarantee they will work as intended.
  44. Attempting to use a policy that contains actions that aren't
  45. supported on all nodes in a cluster will cause errors.
  46. ===========================