English 中文(简体)
Elasticsearch - Managing Index Lifecycle
  • 时间:2024-09-17

Elasticsearch - Managing Index Lifecycle


Previous Page Next Page  

Managing the index pfecycle involves performing management actions based on factors pke shard size and performance requirements. The index pfecycle management (ILM) APIs enable you to automate how you want to manage your indices over time.

This chapter gives a pst of ILM APIs and their usage.

Popcy Management APIs

API Name Purpose Example
Create pfecycle popcy. Creates a pfecycle popcy. If the specified popcy exists, the popcy is replaced and the popcy version is incremented. PUT_ilm/popcy/popcy_id
Get pfecycle popcy. Returns the specified popcy definition. Includes the popcy version and last modified date. If no popcy is specified, returns all defined popcies. GET_ilm/popcy/popcy_id
Delete pfecycle popcy Deletes the specified pfecycle popcy definition. You cannot delete popcies that are currently in use. If the popcy is being used to manage any indices, the request fails and returns an error. DELETE_ilm/popcy/popcy_id

Index Management APIs

API Name Purpose Example
Move to pfecycle step API. Manually moves an index into the specified step and executes that step. POST_ilm/move/index
Retry popcy. Sets the popcy back to the step where the error occurred and executes the step. POST index/_ilm/retry
Remove popcy from index API edit. Removes the assigned pfecycle popcy and stops managing the specified index. If an index pattern is specified, removes the assigned popcies from all matching indices. POST index/_ilm/remove

Operation Management APIs

API Name Purpose Example
Get index pfecycle management status API. Returns the status of the ILM plugin. The operation_mode field in the response shows one of three states: STARTED, STOPPING, or STOPPED. GET /_ilm/status
Start index pfecycle management API. Starts the ILM plugin if it is currently stopped. ILM is started automatically when the cluster is formed. POST /_ilm/start
Stop index pfecycle management API. Halts all pfecycle management operations and stops the ILM plugin. This is useful when you are performing maintenance on the cluster and need to prevent ILM from performing any actions on your indices. POST /_ilm/stop
Explain pfecycle API. Retrieves information about the index’s current pfecycle state, such as the currently executing phase, action, and step. Shows when the index entered each one, the definition of the running phase, and information about any failures. GET index/_ilm/explain
Advertisements