Skip to content

elasticsearch ilm-retry

Retry executing the policy for an index in ERROR step

Description

Set the policy back to the step where the error occurred and execute the step. Use ilm-explain to determine if an index is in the ERROR step.

Synopsis

elasticsearch ilm-retry
    [--site <site>]
    [--cluster <cluster>]
    --index <index>

Arguments

site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default: input.site      Attributes: optional

cluster - (string)

     Name of elastic search cluster
     Example: --cluster "elastic-default"
     Default: elastic-default      Attributes: optional

index - (string)

     Name of the index
     Example: --index "students"
     Default: _None_      Attributes: required

Examples

Input:

! elasticsearch ilm-retry --cluster "elastic-1" --index "class"
Output:
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "cannot retry an action for an index [class] that has not encountered an error when running a Lifecycle Policy"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "cannot retry an action for an index [class] that has not encountered an error when running a Lifecycle Policy"
  },
  "status": 400
}
Input:
! elasticsearch ilm-retry --cluster "elastic-1" --index "test"
Output:
{
  "acknowledged": true
}

Access Control

To use this command, you need access to the following:

Field Value
Action "update"
Service Type "elasticsearch"
Service Instance cluster
Namespace
Object Type "index"
Object ID index

Please see Access Control for details.