Elasticsearch-managing-index-lifecycle

提供:Dev Guides
移動先:案内検索

Elasticsearch-インデックスライフサイクルの管理

インデックスライフサイクルの管理には、シャードサイズやパフォーマンス要件などの要因に基づいて管理アクションを実行することが含まれます。 インデックスライフサイクル管理(ILM)APIを使用すると、インデックスを長期にわたって管理する方法を自動化できます。

この章では、ILM APIとその使用法のリストを示します。

ポリシー管理API

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

インデックス管理API

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

運用管理API

API Name Purpose Example
Get index lifecycle 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 lifecycle 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 lifecycle management API. Halts all lifecycle 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 lifecycle API. Retrieves information about the index’s current lifecycle 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