Get cluster statistics
Generally available; Added in 1.3.0
All methods and paths for this operation:
Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins).
Required authorization
- Cluster privileges:
monitor
Path parameters
-
Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster.
Query parameters
-
Include remote cluster data into the response
-
Period to wait for each node to respond. If a node does not respond before its timeout expires, the response does not include its stats. However, timed out nodes are included in the response’s
_nodes.failed
property. Defaults to no timeout.Values are
-1
or0
.
Responses
-
Hide response attributes Show response attributes object
-
Contains statistics about the number of nodes selected by the request’s node filters.
Hide _nodes attributes Show _nodes attributes object
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Total number of nodes selected by the request.
-
Number of nodes that responded successfully to the request.
-
Number of nodes that rejected the request or failed to respond. If this value is not 0, a reason for the rejection or failure is included in the response.
-
-
Name of the cluster, based on the cluster name setting.
-
Unique identifier for the cluster.
-
Contains statistics about indices with shards assigned to selected nodes.
Hide indices attributes Show indices attributes object
-
Contains statistics about analyzers and analyzer components used in selected nodes.
Hide analysis attributes Show analysis attributes object
-
Contains statistics about analyzer types used in selected nodes.
-
Contains statistics about built-in analyzers used in selected nodes.
-
Contains statistics about built-in character filters used in selected nodes.
-
Contains statistics about built-in token filters used in selected nodes.
-
Contains statistics about built-in tokenizers used in selected nodes.
-
Contains statistics about character filter types used in selected nodes.
-
Contains statistics about token filter types used in selected nodes.
-
Contains statistics about tokenizer types used in selected nodes.
-
Contains statistics about synonyms types used in selected nodes.
-
-
Contains statistics about memory used for completion in selected nodes.
-
Total number of indices with shards assigned to selected nodes.
-
Contains counts for documents in selected nodes.
Hide docs attributes Show docs attributes object
-
Total number of non-deleted documents across all primary shards assigned to selected nodes. This number is based on documents in Lucene segments and may include documents from nested fields.
-
Total number of deleted documents across all primary shards assigned to selected nodes. This number is based on documents in Lucene segments. Elasticsearch reclaims the disk space of deleted Lucene documents when a segment is merged.
-
Returns the total size in bytes of all documents in this stats. This value may be more reliable than store_stats.size_in_bytes in estimating the index size.
-
-
Contains statistics about the field data cache of selected nodes.
-
Contains statistics about the query cache of selected nodes.
Hide query_cache attributes Show query_cache attributes object
-
Total number of entries added to the query cache across all shards assigned to selected nodes. This number includes current and evicted entries.
-
Total number of entries currently in the query cache across all shards assigned to selected nodes.
-
Total number of query cache evictions across all shards assigned to selected nodes.
-
Total count of query cache hits across all shards assigned to selected nodes.
-
Total amount, in bytes, of memory used for the query cache across all shards assigned to selected nodes.
-
Total count of query cache misses across all shards assigned to selected nodes.
-
Total count of hits and misses in the query cache across all shards assigned to selected nodes.
-
-
Holds a snapshot of the search usage statistics. Used to hold the stats for a single node that's part of a ClusterStatsNodeResponse, as well as to accumulate stats for the entire cluster and return them as part of the ClusterStatsResponse.
-
Contains statistics about segments in selected nodes.
Hide segments attributes Show segments attributes object
-
Total number of segments across all shards assigned to selected nodes.
-
Total amount, in bytes, of memory used for doc values across all shards assigned to selected nodes.
-
This object is not populated by the cluster stats API. To get information on segment files, use the node stats API.
-
Total amount of memory, in bytes, used by fixed bit sets across all shards assigned to selected nodes.
-
Total amount, in bytes, of memory used by all index writers across all shards assigned to selected nodes.
-
Unix timestamp, in milliseconds, of the most recently retried indexing request.
-
Total amount, in bytes, of memory used for segments across all shards assigned to selected nodes.
-
Total amount, in bytes, of memory used for normalization factors across all shards assigned to selected nodes.
-
Total amount, in bytes, of memory used for points across all shards assigned to selected nodes.
-
Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes.
-
Total amount, in bytes, of memory used for terms across all shards assigned to selected nodes.
-
Total amount, in bytes, of memory used for term vectors across all shards assigned to selected nodes.
-
Total amount, in bytes, of memory used by all version maps across all shards assigned to selected nodes.
-
-
Contains statistics about indices with shards assigned to selected nodes.
-
Contains statistics about the size of shards assigned to selected nodes.
Hide store attributes Show store attributes object
-
Total size, in bytes, of all shards assigned to selected nodes.
-
A prediction, in bytes, of how much larger the shard stores will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities.
-
Total data set size, in bytes, of all shards assigned to selected nodes. This includes the size of shards not stored fully on the nodes, such as the cache for partially mounted indices.
-
-
Contains statistics about field mappings in selected nodes.
Hide mappings attributes Show mappings attributes object
-
Contains statistics about field data types used in selected nodes.
-
Contains statistics about runtime field data types used in selected nodes.
-
Total number of fields in all non-system indices.
-
Total number of fields in all non-system indices, accounting for mapping deduplication.
-
Total size of all mappings, in bytes, after deduplication and compression.
-
Source mode usage count.
-
-
Contains statistics about analyzers and analyzer components used in selected nodes.
-
Contains statistics about indexed dense vector
-
Contains statistics about indexed sparse vector
-
-
Contains statistics about nodes selected by the request’s node filters.
Hide nodes attributes Show nodes attributes object
-
Contains counts for nodes selected by the request’s node filters.
Hide count attributes Show count attributes object
-
Contains statistics about the discovery types used by selected nodes.
-
Contains statistics about file stores by selected nodes.
Hide fs attributes Show fs attributes object
-
Total number of bytes available to JVM in file stores across all selected nodes. Depending on operating system or process-level restrictions, this number may be less than
nodes.fs.free_in_byes
. This is the actual amount of free disk space the selected Elasticsearch nodes can use. -
Total number, in bytes, of unallocated bytes in file stores across all selected nodes.
-
Total size, in bytes, of all file stores across all selected nodes.
-
Contains statistics about the Java Virtual Machines (JVMs) used by selected nodes.
-
Contains statistics about the transport and HTTP networks used by selected nodes.
-
Contains statistics about the operating systems used by selected nodes.
Hide os attributes Show os attributes object
-
Number of processors used to calculate thread pool size across all selected nodes. This number can be set with the processors setting of a node and defaults to the number of processors reported by the operating system. In both cases, this number will never be larger than 32.
-
Contains statistics about processor architectures (for example, x86_64 or aarch64) used by selected nodes.
-
Number of processors available to JVM across all selected nodes.
-
Contains statistics about operating systems used by selected nodes.
-
Contains statistics about operating systems used by selected nodes.
-
-
Contains statistics about Elasticsearch distributions installed on selected nodes.
Hide packaging_types attributes Show packaging_types attributes object
-
Contains statistics about installed plugins and modules by selected nodes. If no plugins or modules are installed, this array is empty.
-
Contains statistics about processes used by selected nodes.
-
Array of Elasticsearch versions used on selected nodes.
-
-
Contains stats on repository feature usage exposed in cluster stats for telemetry.
-
Contains stats cluster snapshots.
Hide snapshots attributes Show snapshots attributes object
-
Hide current_counts attributes Show current_counts attributes object
-
Snapshots currently in progress
-
Incomplete shard snapshots
-
Snapshots deletions in progress
-
Sum of snapshots and snapshot_deletions
-
Cleanups in progress, not counted in concurrent_operations as they are not concurrent
-
-
-
Health status of the cluster, based on the state of its primary and replica shards.
Supported values include:
green
(orGREEN
): All shards are assigned.yellow
(orYELLOW
): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.red
(orRED
): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.unknown
unavailable
Values are
green
,GREEN
,yellow
,YELLOW
,red
,RED
,unknown
, orunavailable
. -
Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed.
-
Cross-cluster stats
Hide ccs attributes Show ccs attributes object
-
Contains remote cluster settings and metrics collected from them. The keys are cluster names, and the values are per-cluster data. Only present if
include_remotes
option is set to true.Hide clusters attribute Show clusters attribute object
-
Hide * attributes Show * attributes object
-
The UUID of the remote cluster.
-
The connection mode used to communicate with the remote cluster.
-
The
skip_unavailable
setting used for this remote cluster. -
Transport compression setting used for this remote cluster.
-
The list of Elasticsearch versions used by the nodes on the remote cluster.
-
The total count of nodes in the remote cluster.
-
The total number of shards in the remote cluster.
-
The total number of indices in the remote cluster.
-
Total data set size, in bytes, of all shards assigned to selected nodes.
-
Total data set size of all shards assigned to selected nodes, as a human-readable string.
-
Maximum amount of memory, in bytes, available for use by the heap across the nodes of the remote cluster.
-
Maximum amount of memory available for use by the heap across the nodes of the remote cluster, as a human-readable string.
-
Total amount, in bytes, of physical memory across the nodes of the remote cluster.
-
Total amount of physical memory across the nodes of the remote cluster, as a human-readable string.
-
-
-
Information about cross-cluster search usage.
Hide _search attributes Show _search attributes object
-
The total number of cross-cluster search requests that have been executed by the cluster.
-
The total number of cross-cluster search requests that have been successfully executed by the cluster.
-
The total number of cross-cluster search requests (successful or failed) that had at least one remote cluster skipped.
-
The maximum number of remote clusters that were queried in a single cross-cluster search request.
-
The average number of remote clusters that were queried in a single cross-cluster search request.
-
Statistics about the reasons for cross-cluster search request failures. The keys are the failure reason names and the values are the number of requests that failed for that reason.
-
The keys are the names of the search feature, and the values are the number of requests that used that feature. Single request can use more than one feature (e.g. both
async
andwildcard
). -
Statistics about the clients that executed cross-cluster search requests. The keys are the names of the clients, and the values are the number of requests that were executed by that client. Only known clients (such as
kibana
orelasticsearch
) are counted. -
Statistics about the clusters that were queried in cross-cluster search requests. The keys are cluster names, and the values are per-cluster telemetry data. This also includes the local cluster itself, which uses the name
(local)
.
-
-
Information about ES|QL cross-cluster query usage.
Hide _esql attributes Show _esql attributes object
-
The total number of cross-cluster search requests that have been executed by the cluster.
-
The total number of cross-cluster search requests that have been successfully executed by the cluster.
-
The total number of cross-cluster search requests (successful or failed) that had at least one remote cluster skipped.
-
The maximum number of remote clusters that were queried in a single cross-cluster search request.
-
The average number of remote clusters that were queried in a single cross-cluster search request.
-
Statistics about the reasons for cross-cluster search request failures. The keys are the failure reason names and the values are the number of requests that failed for that reason.
-
The keys are the names of the search feature, and the values are the number of requests that used that feature. Single request can use more than one feature (e.g. both
async
andwildcard
). -
Statistics about the clients that executed cross-cluster search requests. The keys are the names of the clients, and the values are the number of requests that were executed by that client. Only known clients (such as
kibana
orelasticsearch
) are counted. -
Statistics about the clusters that were queried in cross-cluster search requests. The keys are cluster names, and the values are per-cluster telemetry data. This also includes the local cluster itself, which uses the name
(local)
.
-
-
-
GET _cluster/stats?human&filter_path=indices.mappings.total_deduplicated_mapping_size*
resp = client.cluster.stats(
human=True,
filter_path="indices.mappings.total_deduplicated_mapping_size*",
)
const response = await client.cluster.stats({
human: "true",
filter_path: "indices.mappings.total_deduplicated_mapping_size*",
});
response = client.cluster.stats(
human: "true",
filter_path: "indices.mappings.total_deduplicated_mapping_size*"
)
$resp = $client->cluster()->stats([
"human" => "true",
"filter_path" => "indices.mappings.total_deduplicated_mapping_size*",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cluster/stats?human&filter_path=indices.mappings.total_deduplicated_mapping_size*"