index.asciidoc 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[index-lifecycle-management]]
  4. = Managing the index lifecycle
  5. :ilm: index lifecycle management
  6. :Ilm: Index lifecycle management
  7. :ILM: ILM
  8. [partintro]
  9. --
  10. beta[]
  11. The <<index-lifecycle-management-api, {ilm} (ILM) APIs>> enable you to automate how you
  12. want to manage your indices over time. Rather than simply performing management
  13. actions on your indices on a set schedule, you can base actions on other factors
  14. such as shard size and performance requirements.
  15. You control how indices are handled as they age by attaching a
  16. lifecycle policy to the index template used to create them. You can update
  17. the policy to modify the lifecycle of both new and existing indices.
  18. For time series indices, there are four stages in the index lifecycle:
  19. * Hot--the index is actively being updated and queried.
  20. * Warm--the index is no longer being updated, but is still being queried.
  21. * Cold--the index is no longer being updated and is seldom queried. The
  22. information still needs to be searchable, but it's okay if those queries are
  23. slower.
  24. * Delete--the index is no longer needed and can safely be deleted.
  25. The lifecycle policy governs how the index transitions through these stages and
  26. the actions that are performed on the index at each stage. The policy can
  27. specify:
  28. * The maximum size or age at which you want to roll over to a new index.
  29. * The point at which the index is no longer being updated and the number of
  30. primary shards can be reduced.
  31. * When to force a merge to permanently delete documents marked for deletion.
  32. * The point at which the index can be moved to less performant hardware.
  33. * The point at which the availability is not as critical and the number of
  34. replicas can be reduced.
  35. * When the index can be safely deleted.
  36. For example, if you are indexing metrics data from a fleet of ATMs into
  37. Elasticsearch, you might define a policy that says:
  38. . When the index reaches 5GB, roll over to a new index.
  39. . Move the old index into the warm stage, mark it read only, and shrink it down
  40. to a single shard.
  41. . After 7 days, move the index into the cold stage and move it to less expensive
  42. hardware.
  43. . Delete the index once the required 30 day retention period is reached.
  44. --
  45. include::getting-started-ilm.asciidoc[]
  46. include::policy-definitions.asciidoc[]
  47. include::set-up-lifecycle-policy.asciidoc[]
  48. include::using-policies-rollover.asciidoc[]
  49. include::update-lifecycle-policy.asciidoc[]
  50. include::error-handling.asciidoc[]
  51. include::ilm-and-snapshots.asciidoc[]
  52. include::start-stop-ilm.asciidoc[]