Get shard recovery information
- GET /_cat/recovery/{index}
- GET /_cat/recovery
Get information about ongoing and completed shard recoveries. Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or syncing a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing. For data streams, the API returns information about the stream’s backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index recovery API.
Required authorization
- Index privileges monitor
- Cluster privileges monitor
Query parameters
-
active_onlyboolean · default: false -
If
true, the response only includes shard recoveries that have not yet completed (excludesdonestage). -
detailedboolean · default: false -
If
true, the response includes detailed information about shard recoveries. -
indexoneOf -
Comma-separated list or wildcard expression of index names to limit the returned information
-
hunion · default: ip,hp,rp,r,m,n,cpu,l -
A comma-separated list of columns names to display. It supports simple wildcards.
Supported values include:
index(ori,idx): The index name.shard(ors,sh): The shard name.start_time(orstart): The recovery start time.start_time_millis(orstart_millis): The recovery start time in epoch milliseconds.stop_time(orstop): The recovery stop time.stop_time_millis(orstop_millis): The recovery stop time in epoch milliseconds.time(ort,ti): The recovery time.type(orty): The recovery type.stage(orst): The recovery stage.local_retries(orlr): The number of times this recovery has failed in a way which is retried locally (i.e. on the data node).priority(orpr): The recovery priority.gate(org): The name of the recovery gate that blocked recovery on the target node.
The value is
n/aunless the recovery is queued in thecreatedstage and blocked by a recovery gate.blocked_for_millis(orbf): The elapsed time in milliseconds recovery is blocked for.
The value is
n/awhen the recovery is not blocked by a recovery gate.source_host(orshost): The source host.source_node(orsnode): The source node name.target_host(orthost): The target host.target_node(ortnode): The target node name.repository(orrep): The repository.snapshot(orsnap): The snapshot.files(orf): The number of files to recover.files_recovered(orfr): The files recovered.files_percent(orfp): The percent of files recovered.files_total(ortf): The total number of files.bytes(orb): The number of bytes to recover.bytes_recovered(orbr): The bytes recovered.bytes_percent(orbp): The percent of bytes recovered.bytes_total(ortb): The total number of bytes.translog_ops(orto): The number of translog ops to recover.translog_ops_recovered(ortor): The translog ops recovered.translog_ops_percent(ortop): The percent of translog ops recovered.
-
Values:
indexiidxshardsshstart_timestartstart_time_millisstart_millisstop_timestopstop_time_millisstop_millistimettitypetystagestlocal_retrieslrpriorityprgategblocked_for_millisbfsource_hostshostsource_nodesnodetarget_hostthosttarget_nodetnoderepositoryrepsnapshotsnapfilesffiles_recoveredfrfiles_percentfpfiles_totaltfbytesbbytes_recoveredbrbytes_percentbpbytes_totaltbtranslog_opstotranslog_ops_recoveredtortranslog_ops_percenttop -
soneOf -
A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting
:ascor:descas a suffix to the column name. -
formatstring · default: text -
Specifies the format to return the columnar data in, can be set to
text,json,cbor,yaml, orsmile. -
helpboolean · default: false -
When set to
truewill output available columns. This option can't be combined with any other query string option. -
bytes -
Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance
1kbmeans 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such askb,mb, orgb, chosen such that the numeric value of the column is as small as possible whilst still being at least1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down. -
Values:
bkbmbgbtbpb -
time -
Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as
ms,s,morh, chosen such that the numeric value of the column is as small as possible whilst still being at least1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down. -
Values:
nanosmicrosmssmhd