ilm-overview.asciidoc 2.2 KB

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