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.
- Index privileges:
monitor - Cluster privileges:
monitor
Path Parameters
-
indexIndexName | IndexNameoptional -
A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (
*). To target all data streams and indices, omit this parameter or use*or_all.Leave it out to use
/_cat/recovery.
Query Parameters
-
active_onlyboolean · default: false If
true, the response only includes ongoing shard recoveries.-
detailedboolean · default: false If
true, the response includes detailed information about shard recoveries.-
indexIndices Comma-separated list or wildcard expression of index names to limit the returned information
-
hCatRecoveryColumns · 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.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_millistimettitypetystagestsource_hostshostsource_nodesnodetarget_hostthosttarget_nodetnoderepositoryrepsnapshotsnapfilesffiles_recoveredfrfiles_percentfpfiles_totaltfbytesbbytes_recoveredbrbytes_percentbpbytes_totaltbtranslog_opstotranslog_ops_recoveredtortranslog_ops_percenttop -
sNames 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.
Response
Response Type: RecoveryRecord
-
indexstring IndexName -
The index name.
-
shardstring -
The shard name.
-
start_timeDateTime -
The recovery start time.
-
start_time_millisEpochTimeUnitMillis -
The recovery start time in epoch milliseconds.
-
stop_timeDateTime -
The recovery stop time.
-
stop_time_millisEpochTimeUnitMillis -
The recovery stop time in epoch milliseconds.
-
timestring Duration -
The recovery time.
-
typestring -
The recovery type.
-
stagestring -
The recovery stage.
-
source_hoststring -
The source host.
-
source_nodestring -
The source node name.
-
target_hoststring -
The target host.
-
target_nodestring -
The target node name.
-
repositorystring -
The repository name.
-
snapshotstring -
The snapshot name.
-
filesstring -
The number of files to recover.
-
files_recoveredstring -
The files recovered.
-
files_percentnumber | string Percentage -
The ratio of files recovered.
-
files_totalstring -
The total number of files.
-
bytesstring -
The number of bytes to recover.
-
bytes_recoveredstring -
The bytes recovered.
-
bytes_percentnumber | string Percentage -
The ratio of bytes recovered.
-
bytes_totalstring -
The total number of bytes.
-
translog_opsstring -
The number of translog operations to recover.
-
translog_ops_recoveredstring -
The translog operations recovered.
-
translog_ops_percentnumber | string Percentage -
The ratio of translog operations recovered.