Skip to content

elasticsearch ilm-explain

Explain index lifecycle management

Description

Retrieve the current lifecycle status for one or more indices

Synopsis

elasticsearch ilm-explain
    [--site <site>]
    [--cluster <cluster>]
    [--target <target>]
    [--only_errors]

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

target - (string)

     List of data streams, indices, and index aliases used to limit the request
     Example: --target "students or _all"
     Default: _all      Attributes: optional, multiple allowed

only_errors - (bool)

     If set, Filters the returned indices to only indices that are managed by ILM and are in an error state
     Example: --only_errors
     Default: _None_      Attributes: optional

Examples

Input:

! elasticsearch ilm-explain --cluster "elastic-1"
Output:
{
  "indices": {
    "my_target_index_17": {
      "index": "my_target_index_17",
      "managed": false
    },
    "my_source_index": {
      "index": "my_source_index",
      "managed": false
    },
    "my_target_index_18": {
      "index": "my_target_index_18",
      "managed": false
    },
    "test": {
      "index": "test",
      "managed": false
    },
    "my_target_index_9": {
      "index": "my_target_index_9",
      "managed": false
    },
    "split_index_1": {
      "index": "split_index_1",
      "managed": false
    },
    "my_target_index_91": {
      "index": "my_target_index_91",
      "managed": false
    },
    "test1": {
      "index": "test1",
      "managed": false
    },
    "my_target_index_90": {
      "index": "my_target_index_90",
      "managed": false
    },
    "my_target_index": {
      "index": "my_target_index",
      "managed": false
    },
    "my_target_index_6": {
      "index": "my_target_index_6",
      "managed": false
    },
    "my_target_index_7": {
      "index": "my_target_index_7",
      "managed": false
    },
    "my_target_index_4": {
      "index": "my_target_index_4",
      "managed": false
    },
    "my_target_index_2": {
      "index": "my_target_index_2",
      "managed": false
    },
    "my_target_index_3": {
      "index": "my_target_index_3",
      "managed": false
    },
    "class": {
      "index": "class",
      "managed": false
    },
    "my-index-000001": {
      "index": "my-index-000001",
      "managed": false
    },
    "my_target_index_1": {
      "index": "my_target_index_1",
      "managed": false
    }
  }
}
Input:
! elasticsearch ilm-explain --cluster "elastic-1" --only_errors
Output:
{
  "indices": {}
}

Access Control

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

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

Please see Access Control for details.