Skip to content

elasticsearch recoveries

Get shard recoveries

Description

Get information about ongoing and completed shard recoveries

Synopsis

elasticsearch recoveries
    [--site <site>]
    [--cluster <cluster>]
    [--target <target>]
    [--filter_path <filter_path>]
    [--sort <sort>]
    [--active_only]
    [--detailed]

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

filter_path - (string)

     Path in the response. Filters and returns only parts of response matching this path
     Example: --filter_path "index.mappings.properties.*"
     Default: _None_      Attributes: optional, multiple allowed

sort - (string)

     List of column names or column aliases used to sort the response.
     Example: --sort "index,health"
     Default: _None_      Attributes: optional, multiple allowed

active_only - (bool)

     If set, response only includes ongoing shard recoveries.
     Example: --active_only
     Default: _None_      Attributes: optional

detailed - (bool)

     If set, response only includes detailed info of shard recoveries.
     Example: --detailed
     Default: _None_      Attributes: optional

Examples

Input:

! elasticsearch recoveries --cluster "elastic-1" --target "my-index-000001" --target "class" --detailed --sort "index" --sort "files"
Output:
[
  {
    "index": "class",
    "shard": "0",
    "time": "859ms",
    "type": "existing_store",
    "stage": "done",
    "source_host": "n/a",
    "source_node": "n/a",
    "target_host": "localhost",
    "target_node": "beehyv-H81M-S",
    "repository": "n/a",
    "snapshot": "n/a",
    "files": "0",
    "files_recovered": "0",
    "files_percent": "100.0%",
    "files_total": "1",
    "bytes": "0",
    "bytes_recovered": "0",
    "bytes_percent": "100.0%",
    "bytes_total": "208",
    "translog_ops": "0",
    "translog_ops_recovered": "0",
    "translog_ops_percent": "100.0%"
  },
  {
    "index": "class",
    "shard": "1",
    "time": "669ms",
    "type": "existing_store",
    "stage": "done",
    "source_host": "n/a",
    "source_node": "n/a",
    "target_host": "localhost",
    "target_node": "beehyv-H81M-S",
    "repository": "n/a",
    "snapshot": "n/a",
    "files": "0",
    "files_recovered": "0",
    "files_percent": "100.0%",
    "files_total": "1",
    "bytes": "0",
    "bytes_recovered": "0",
    "bytes_percent": "100.0%",
    "bytes_total": "208",
    "translog_ops": "0",
    "translog_ops_recovered": "0",
    "translog_ops_percent": "100.0%"
  },
  {
    "index": "my-index-000001",
    "shard": "0",
    "time": "2.1s",
    "type": "existing_store",
    "stage": "done",
    "source_host": "n/a",
    "source_node": "n/a",
    "target_host": "localhost",
    "target_node": "beehyv-H81M-S",
    "repository": "n/a",
    "snapshot": "n/a",
    "files": "0",
    "files_recovered": "0",
    "files_percent": "100.0%",
    "files_total": "13",
    "bytes": "0",
    "bytes_recovered": "0",
    "bytes_percent": "100.0%",
    "bytes_total": "15934",
    "translog_ops": "0",
    "translog_ops_recovered": "0",
    "translog_ops_percent": "100.0%"
  }
]

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.