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
-
detailedboolean · default: false -
If
true, the response includes detailed information about shard recoveries. -
indexunion string | string[] -
Comma-separated list or wildcard expression of index names to limit the returned information
-
hunion oneOf · 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 name of the index.shard(ors,sh): The name of the shard.time(ort,ti,primaryOrReplica): The recovery time elasped.type: The type of recovery, from a peer or a snapshot.stage(orst): The stage of the recovery. Returned values are:INIT,INDEX: recovery of lucene files, either reusing local ones are copying new ones,VERIFY_INDEX: potentially running check index,TRANSLOG: starting up the engine, replaying the translog,FINALIZE: performing final task after all translog ops have been done,DONEsource_host(orshost): The host address the index is moving from.source_node(orsnode): The node name the index is moving from.target_host(orthost): The host address the index is moving to.target_node(ortnode): The node name the index is moving to.repository(ortnode): The name of the repository being used. if not relevant 'n/a'.snapshot(orsnap): The name of the snapshot being used. if not relevant 'n/a'.files(orf): The total number of files to recover.files_recovered(orfr): The number of files currently recovered.files_percent(orfp): The percentage of files currently recovered.files_total(ortf): The total number of files.bytes(orb): The total number of bytes to recover.bytes_recovered(orbr): Total number of bytes currently recovered.bytes_percent(orbp): The percentage of bytes currently recovered.bytes_total(ortb): The total number of bytes.translog_ops(orto): The total number of translog ops to recover.translog_ops_recovered(ortor): The total number of translog ops currently recovered.translog_ops_percent(ortop): The percentage of translog ops currently recovered.start_time(orstart): The start time of the recovery operation.start_time_millis(orstart_millis): The start time of the recovery operation in eopch milliseconds.stop_time(orstop): The end time of the recovery operation. If ongoing '1970-01-01T00:00:00.000Z'stop_time_millis(orstop_millis): The end time of the recovery operation in eopch milliseconds. If ongoing '0'
-
Values:
indexiidxshardsshtimettiprimaryOrReplicatypestagestsource_hostshostsource_nodesnodetarget_hostthosttarget_nodetnoderepositorysnapshotsnapfilesffiles_recoveredfrfiles_percentfpfiles_totaltfbytesbbytes_recoveredbrbytes_percentbpbytes_totaltbtranslog_opstotranslog_ops_recoveredtortranslog_ops_percenttopstart_timestartstart_time_millisstart_millisstop_timestopstop_time_millisstop_millis -
sunion string | string[] -
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. -
bytesenum -
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 -
timeenum -
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
Response
<array>object[]