Get shard information
- GET /_cat/shards/{index}
- GET /_cat/shards
Get information about the shards in a cluster. For data streams, the API returns information about the 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.
- 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/shards.
Query Parameters
-
hCatShardColumns List of columns to appear in the response. Supports simple wildcards.
Supported values include:
completion.size(orcs,completionSize): Size of completion. For example:0b.dataset.size: Disk space used by the shard’s dataset, which may or may not be the size on disk, but includes space used by the shard on object storage. Reported as a size value for example:5kb.dense_vector.value_count(ordvc,denseVectorCount): Number of indexed dense vectors.docs(ord,dc): Number of documents in shard, for example:25.fielddata.evictions(orfe,fielddataEvictions): Fielddata cache evictions, for example:0.fielddata.memory_size(orfm,fielddataMemory): Used fielddata cache memory, for example:0b.flush.total(orft,flushTotal): Number of flushes, for example:1.flush.total_time(orftt,flushTotalTime): Time spent in flush, for example:1.get.current(orgc,getCurrent): Number of current get operations, for example:0.get.exists_time(orgeti,getExistsTime): Time spent in successful gets, for example:14ms.get.exists_total(orgeto,getExistsTotal): Number of successful get operations, for example:2.get.missing_time(orgmti,getMissingTime): Time spent in failed gets, for example:0s.get.missing_total(orgmto,getMissingTotal): Number of failed get operations, for example:1.get.time(orgti,getTime): Time spent in get, for example:14ms.get.total(orgto,getTotal): Number of get operations, for example:2.id: ID of the node, for example:k0zy.index(ori,idx): Name of the index.indexing.delete_current(oridc,indexingDeleteCurrent): Number of current deletion operations, for example:0.indexing.delete_time(oridti,indexingDeleteTime): Time spent in deletions, for example:2ms.indexing.delete_total(oridto,indexingDeleteTotal): Number of deletion operations, for example:2.indexing.index_current(oriic,indexingIndexCurrent): Number of current indexing operations, for example:0.indexing.index_failed_due_to_version_conflict(oriifvc,indexingIndexFailedDueToVersionConflict): Number of failed indexing operations due to version conflict, for example:0.indexing.index_failed(oriif,indexingIndexFailed): Number of failed indexing operations, for example:0.indexing.index_time(oriiti,indexingIndexTime): Time spent in indexing, such as for example:134ms.indexing.index_total(oriito,indexingIndexTotal): Number of indexing operations, for example:1.ip: IP address of the node, for example:127.0.1.1.merges.current(ormc,mergesCurrent): Number of current merge operations, for example:0.merges.current_docs(ormcd,mergesCurrentDocs): Number of current merging documents, for example:0.merges.current_size(ormcs,mergesCurrentSize): Size of current merges, for example:0b.merges.total(ormt,mergesTotal): Number of completed merge operations, for example:0.merges.total_docs(ormtd,mergesTotalDocs): Number of merged documents, for example:0.merges.total_size(ormts,mergesTotalSize): Size of current merges, for example:0b.merges.total_time(ormtt,mergesTotalTime): Time spent merging documents, for example:0s.node(orn): Node name, for example:I8hydUG.prirep(orp,pr,primaryOrReplica): Shard type. Returned values areprimaryorreplica.query_cache.evictions(orqce,queryCacheEvictions): Query cache evictions, for example:0.query_cache.memory_size(orqcm,queryCacheMemory): Used query cache memory, for example:0b.recoverysource.type(orrs): Type of recovery source.refresh.time(orrti,refreshTime): Time spent in refreshes, for example:91ms.refresh.total(orrto,refreshTotal): Number of refreshes, for example:16.search.fetch_current(orsfc,searchFetchCurrent): Current fetch phase operations, for example:0.search.fetch_time(orsfti,searchFetchTime): Time spent in fetch phase, for example:37ms.search.fetch_total(orsfto,searchFetchTotal): Number of fetch operations, for example:7.search.open_contexts(orso,searchOpenContexts): Open search contexts, for example:0.search.query_current(orsqc,searchQueryCurrent): Current query phase operations, for example:0.search.query_time(orsqti,searchQueryTime): Time spent in query phase, for example:43ms.search.query_total(orsqto,searchQueryTotal): Number of query operations, for example:9.search.scroll_current(orscc,searchScrollCurrent): Open scroll contexts, for example:2.search.scroll_time(orscti,searchScrollTime): Time scroll contexts held open, for example:2m.search.scroll_total(orscto,searchScrollTotal): Completed scroll contexts, for example:1.segments.count(orsc,segmentsCount): Number of segments, for example:4.segments.fixed_bitset_memory(orsfbm,fixedBitsetMemory): Memory used by fixed bit sets for nested object field types and type filters for types referred in join fields, for example:1.0kb.segments.index_writer_memory(orsiwm,segmentsIndexWriterMemory): Memory used by index writer, for example:18mb.segments.memory(orsm,segmentsMemory): Memory used by segments, for example:1.4kb.segments.version_map_memory(orsvmm,segmentsVersionMapMemory): Memory used by version map, for example:1.0kb.seq_no.global_checkpoint(orsqg,globalCheckpoint): Global checkpoint.seq_no.local_checkpoint(orsql,localCheckpoint): Local checkpoint.seq_no.max(orsqm,maxSeqNo): Maximum sequence number.shard(ors,sh): Name of the shard.dsparse_vector.value_count(orsvc,sparseVectorCount): Number of indexed sparse vectors.state(orst): State of the shard. Returned values are:
INITIALIZING: The shard is recovering from a peer shard or gateway.RELOCATING: The shard is relocating.STARTED: The shard has started.UNASSIGNED: The shard is not assigned to any node.store(orsto): Disk space used by the shard, for example:5kb.suggest.current(orsuc,suggestCurrent): Number of current suggest operations, for example:0.suggest.time(orsuti,suggestTime): Time spent in suggest, for example:0.suggest.total(orsuto,suggestTotal): Number of suggest operations, for example:0.sync_id: Sync ID of the shard.unassigned.at(orua): Time at which the shard became unassigned in Coordinated Universal Time (UTC).unassigned.details(orud): Details about why the shard became unassigned. This does not explain why the shard is currently unassigned. To understand why a shard is not assigned, use the Cluster allocation explain API.unassigned.for(oruf): Time at which the shard was requested to be unassigned in Coordinated Universal Time (UTC).unassigned.reason(orur): Indicates the reason for the last change to the state of this unassigned shard. This does not explain why the shard is currently unassigned. To understand why a shard is not assigned, use the Cluster allocation explain API. Returned values include:
ALLOCATION_FAILED: Unassigned as a result of a failed allocation of the shard.CLUSTER_RECOVERED: Unassigned as a result of a full cluster recovery.DANGLING_INDEX_IMPORTED: Unassigned as a result of importing a dangling index.EXISTING_INDEX_RESTORED: Unassigned as a result of restoring into a closed index.FORCED_EMPTY_PRIMARY: The shard’s allocation was last modified by forcing an empty primary using the Cluster reroute API.INDEX_CLOSED: Unassigned because the index was closed.INDEX_CREATED: Unassigned as a result of an API creation of an index.INDEX_REOPENED: Unassigned as a result of opening a closed index.MANUAL_ALLOCATION: The shard’s allocation was last modified by the Cluster reroute API.NEW_INDEX_RESTORED: Unassigned as a result of restoring into a new index.NODE_LEFT: Unassigned as a result of the node hosting it leaving the cluster.NODE_RESTARTING: Similar toNODE_LEFT, except that the node was registered as restarting using the Node shutdown API.PRIMARY_FAILED: The shard was initializing as a replica, but the primary shard failed before the initialization completed.REALLOCATED_REPLICA: A better replica location is identified and causes the existing replica allocation to be cancelled.REINITIALIZED: When a shard moves from started back to initializing.REPLICA_ADDED: Unassigned as a result of explicit addition of a replica.REROUTE_CANCELLED: Unassigned as a result of explicit cancel reroute command.
-
Values:
completion.sizecscompletionSizedataset.sizedense_vector.value_countdvcdenseVectorCountdocsddcfielddata.evictionsfefielddataEvictionsfielddata.memory_sizefmfielddataMemoryflush.totalftflushTotalflush.total_timefttflushTotalTimeget.currentgcgetCurrentget.exists_timegetigetExistsTimeget.exists_totalgetogetExistsTotalget.missing_timegmtigetMissingTimeget.missing_totalgmtogetMissingTotalget.timegtigetTimeget.totalgtogetTotalidindexiidxindexing.delete_currentidcindexingDeleteCurrentindexing.delete_timeidtiindexingDeleteTimeindexing.delete_totalidtoindexingDeleteTotalindexing.index_currentiicindexingIndexCurrentindexing.index_failed_due_to_version_conflictiifvcindexingIndexFailedDueToVersionConflictindexing.index_failediifindexingIndexFailedindexing.index_timeiitiindexingIndexTimeindexing.index_totaliitoindexingIndexTotalipmerges.currentmcmergesCurrentmerges.current_docsmcdmergesCurrentDocsmerges.current_sizemcsmergesCurrentSizemerges.totalmtmergesTotalmerges.total_docsmtdmergesTotalDocsmerges.total_sizemtsmergesTotalSizemerges.total_timemttmergesTotalTimenodenprireppprprimaryOrReplicaquery_cache.evictionsqcequeryCacheEvictionsquery_cache.memory_sizeqcmqueryCacheMemoryrecoverysource.typersrefresh.timertirefreshTimerefresh.totalrtorefreshTotalsearch.fetch_currentsfcsearchFetchCurrentsearch.fetch_timesftisearchFetchTimesearch.fetch_totalsftosearchFetchTotalsearch.open_contextssosearchOpenContextssearch.query_currentsqcsearchQueryCurrentsearch.query_timesqtisearchQueryTimesearch.query_totalsqtosearchQueryTotalsearch.scroll_currentsccsearchScrollCurrentsearch.scroll_timesctisearchScrollTimesearch.scroll_totalsctosearchScrollTotalsegments.countscsegmentsCountsegments.fixed_bitset_memorysfbmfixedBitsetMemorysegments.index_writer_memorysiwmsegmentsIndexWriterMemorysegments.memorysmsegmentsMemorysegments.version_map_memorysvmmsegmentsVersionMapMemoryseq_no.global_checkpointsqgglobalCheckpointseq_no.local_checkpointsqllocalCheckpointseq_no.maxsqmmaxSeqNoshardsshdsparse_vector.value_countsvcsparseVectorCountstateststorestosuggest.currentsucsuggestCurrentsuggest.timesutisuggestTimesuggest.totalsutosuggestTotalsync_idunassigned.atuaunassigned.detailsudunassigned.forufunassigned.reasonur -
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.-
master_timeoutstring Duration · default: 30s The period to wait for a connection to the master node.
Response
Response Type: ShardsRecord
-
indexstring -
The index name.
-
shardstring -
The shard name.
-
prirepstring -
The shard type:
primaryorreplica. -
statestring -
The shard state. Returned values include:
INITIALIZING: The shard is recovering from a peer shard or gateway.RELOCATING: The shard is relocating.STARTED: The shard has started.UNASSIGNED: The shard is not assigned to any node. -
docsstringnullable -
The number of documents in the shard.
-
storestringnullable -
The disk space used by the shard.
-
datasetstringnullable -
total size of dataset (including the cache for partially mounted indices)
-
ipstringnullable -
The IP address of the node.
-
idstring -
The unique identifier for the node.
-
nodestringnullable -
The name of node.
-
sync_idstring -
The sync identifier.
-
unassigned.reasonstring -
The reason for the last change to the state of an unassigned shard. It does not explain why the shard is currently unassigned; use the cluster allocation explain API for that information. Returned values include:
ALLOCATION_FAILED: Unassigned as a result of a failed allocation of the shard.CLUSTER_RECOVERED: Unassigned as a result of a full cluster recovery.DANGLING_INDEX_IMPORTED: Unassigned as a result of importing a dangling index.EXISTING_INDEX_RESTORED: Unassigned as a result of restoring into a closed index.FORCED_EMPTY_PRIMARY: The shard’s allocation was last modified by forcing an empty primary using the cluster reroute API.INDEX_CLOSED: Unassigned because the index was closed.INDEX_CREATED: Unassigned as a result of an API creation of an index.INDEX_REOPENED: Unassigned as a result of opening a closed index.MANUAL_ALLOCATION: The shard’s allocation was last modified by the cluster reroute API.NEW_INDEX_RESTORED: Unassigned as a result of restoring into a new index.NODE_LEFT: Unassigned as a result of the node hosting it leaving the cluster.NODE_RESTARTING: Similar toNODE_LEFT, except that the node was registered as restarting using the node shutdown API.PRIMARY_FAILED: The shard was initializing as a replica, but the primary shard failed before the initialization completed.REALLOCATED_REPLICA: A better replica location is identified and causes the existing replica allocation to be cancelled.REINITIALIZED: When a shard moves from started back to initializing.REPLICA_ADDED: Unassigned as a result of explicit addition of a replica.REROUTE_CANCELLED: Unassigned as a result of explicit cancel reroute command. -
unassigned.atstring -
The time at which the shard became unassigned in Coordinated Universal Time (UTC).
-
unassigned.forstring -
The time at which the shard was requested to be unassigned in Coordinated Universal Time (UTC).
-
unassigned.detailsstring -
Additional details as to why the shard became unassigned. It does not explain why the shard is not assigned; use the cluster allocation explain API for that information.
-
recoverysource.typestring -
The type of recovery source.
-
completion.sizestring -
The size of completion.
-
fielddata.memory_sizestring -
The used fielddata cache memory.
-
fielddata.evictionsstring -
The fielddata cache evictions.
-
query_cache.memory_sizestring -
The used query cache memory.
-
query_cache.evictionsstring -
The query cache evictions.
-
flush.totalstring -
The number of flushes.
-
flush.total_timestring -
The time spent in flush.
-
get.currentstring -
The number of current get operations.
-
get.timestring -
The time spent in get operations.
-
get.totalstring -
The number of get operations.
-
get.exists_timestring -
The time spent in successful get operations.
-
get.exists_totalstring -
The number of successful get operations.
-
get.missing_timestring -
The time spent in failed get operations.
-
get.missing_totalstring -
The number of failed get operations.
-
indexing.delete_currentstring -
The number of current deletion operations.
-
indexing.delete_timestring -
The time spent in deletion operations.
-
indexing.delete_totalstring -
The number of delete operations.
-
indexing.index_currentstring -
The number of current indexing operations.
-
indexing.index_timestring -
The time spent in indexing operations.
-
indexing.index_totalstring -
The number of indexing operations.
-
indexing.index_failedstring -
The number of failed indexing operations.
-
merges.currentstring -
The number of current merge operations.
-
merges.current_docsstring -
The number of current merging documents.
-
merges.current_sizestring -
The size of current merge operations.
-
merges.totalstring -
The number of completed merge operations.
-
merges.total_docsstring -
The nuber of merged documents.
-
merges.total_sizestring -
The size of current merges.
-
merges.total_timestring -
The time spent merging documents.
-
refresh.totalstring -
The total number of refreshes.
-
refresh.timestring -
The time spent in refreshes.
-
refresh.external_totalstring -
The total nunber of external refreshes.
-
refresh.external_timestring -
The time spent in external refreshes.
-
refresh.listenersstring -
The number of pending refresh listeners.
-
search.fetch_currentstring -
The current fetch phase operations.
-
search.fetch_timestring -
The time spent in fetch phase.
-
search.fetch_totalstring -
The total number of fetch operations.
-
search.open_contextsstring -
The number of open search contexts.
-
search.query_currentstring -
The current query phase operations.
-
search.query_timestring -
The time spent in query phase.
-
search.query_totalstring -
The total number of query phase operations.
-
search.scroll_currentstring -
The open scroll contexts.
-
search.scroll_timestring -
The time scroll contexts were held open.
-
search.scroll_totalstring -
The number of completed scroll contexts.
-
segments.countstring -
The number of segments.
-
segments.memorystring -
The memory used by segments.
-
segments.index_writer_memorystring -
The memory used by the index writer.
-
segments.version_map_memorystring -
The memory used by the version map.
-
segments.fixed_bitset_memorystring -
The memory used by fixed bit sets for nested object field types and export type filters for types referred in
_parentfields. -
seq_no.maxstring -
The maximum sequence number.
-
seq_no.local_checkpointstring -
The local checkpoint.
-
seq_no.global_checkpointstring -
The global checkpoint.
-
warmer.currentstring -
The number of current warmer operations.
-
warmer.totalstring -
The total number of warmer operations.
-
warmer.total_timestring -
The time spent in warmer operations.
-
path.datastring -
The shard data path.
-
path.statestring -
The shard state path.
-
bulk.total_operationsstring -
The number of bulk shard operations.
-
bulk.total_timestring -
The time spent in shard bulk operations.
-
bulk.total_size_in_bytesstring -
The total size in bytes of shard bulk operations.
-
bulk.avg_timestring -
The average time spent in shard bulk operations.
-
bulk.avg_size_in_bytesstring -
The average size in bytes of shard bulk operations.