Get cluster statistics

  • GET /_cluster/stats/nodes/{node_id}
  • GET /_cluster/stats
Auth

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 privileges

Cluster privileges monitor

Path parameters

node_id union string | string[] optional

Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster.

Leave it out to use /_cluster/stats.

Query parameters

include_remotes boolean · default: false

Include remote cluster data into the response

timeout union oneOf

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: -1 0

Response

application/json
cluster_name string required

Name of the cluster, based on the cluster name setting.

cluster_uuid string required

Unique identifier for the cluster.

indices object required

Contains statistics about indices with shards assigned to selected nodes.

completion object required

Contains statistics about memory used for completion in selected nodes.

size_in_bytes number required

Total amount, in bytes, of memory used for completion across all shards assigned to selected nodes.

size number | string

Total amount of memory used for completion across all shards assigned to selected nodes.

fields map string to object
count number required

Total number of indices with shards assigned to selected nodes.

docs object required

Contains counts for documents in selected nodes.

count number required

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.

deleted number

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.

total_size_in_bytes number required

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.

total_size number | string

Human readable total_size_in_bytes

fielddata object required

Contains statistics about the field data cache of selected nodes.

evictions number
memory_size number | string
memory_size_in_bytes number required
fields map string to object
global_ordinals object required
build_time_in_millis number required
build_time string
fields map string to object
query_cache object required

Contains statistics about the query cache of selected nodes.

cache_count number required

Total number of entries added to the query cache across all shards assigned to selected nodes. This number includes current and evicted entries.

cache_size number required

Total number of entries currently in the query cache across all shards assigned to selected nodes.

evictions number required

Total number of query cache evictions across all shards assigned to selected nodes.

hit_count number required

Total count of query cache hits across all shards assigned to selected nodes.

memory_size number | string

Total amount of memory used for the query cache across all shards assigned to selected nodes.

memory_size_in_bytes number required

Total amount, in bytes, of memory used for the query cache across all shards assigned to selected nodes.

miss_count number required

Total count of query cache misses across all shards assigned to selected nodes.

total_count number required

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.

total number required
queries map string to number required
rescorers map string to number required
sections map string to number required
retrievers map string to number required
extended object required
segments object required

Contains statistics about segments in selected nodes.

count number required

Total number of segments across all shards assigned to selected nodes.

doc_values_memory number | string

Total amount of memory used for doc values across all shards assigned to selected nodes.

doc_values_memory_in_bytes number required

Total amount, in bytes, of memory used for doc values across all shards assigned to selected nodes.

file_sizes map string to object required

This object is not populated by the cluster stats API. To get information on segment files, use the node stats API.

<string> object
description string required
size_in_bytes number required
min_size_in_bytes number
max_size_in_bytes number
average_size_in_bytes number
count number
fixed_bit_set number | string

Total amount of memory used by fixed bit sets across all shards assigned to selected nodes. Fixed bit sets are used for nested object field types and type filters for join fields.

fixed_bit_set_memory_in_bytes number required

Total amount of memory, in bytes, used by fixed bit sets across all shards assigned to selected nodes.

index_writer_memory number | string

Total amount of memory used by all index writers across all shards assigned to selected nodes.

index_writer_memory_in_bytes number required

Total amount, in bytes, of memory used by all index writers across all shards assigned to selected nodes.

max_unsafe_auto_id_timestamp number required

Unix timestamp, in milliseconds, of the most recently retried indexing request.

memory number | string

Total amount of memory used for segments across all shards assigned to selected nodes.

memory_in_bytes number required

Total amount, in bytes, of memory used for segments across all shards assigned to selected nodes.

norms_memory number | string

Total amount of memory used for normalization factors across all shards assigned to selected nodes.

norms_memory_in_bytes number required

Total amount, in bytes, of memory used for normalization factors across all shards assigned to selected nodes.

points_memory number | string

Total amount of memory used for points across all shards assigned to selected nodes.

points_memory_in_bytes number required

Total amount, in bytes, of memory used for points across all shards assigned to selected nodes.

stored_fields_memory_in_bytes number required

Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes.

stored_fields_memory number | string

Total amount of memory used for stored fields across all shards assigned to selected nodes.

terms_memory_in_bytes number required

Total amount, in bytes, of memory used for terms across all shards assigned to selected nodes.

terms_memory number | string

Total amount of memory used for terms across all shards assigned to selected nodes.

term_vectors_memory number | string

Total amount of memory used for term vectors across all shards assigned to selected nodes.

term_vectors_memory_in_bytes number required

Total amount, in bytes, of memory used for term vectors across all shards assigned to selected nodes.

version_map_memory number | string

Total amount of memory used by all version maps across all shards assigned to selected nodes.

version_map_memory_in_bytes number required

Total amount, in bytes, of memory used by all version maps across all shards assigned to selected nodes.

shards object required

Contains statistics about indices with shards assigned to selected nodes.

primaries number

Number of primary shards assigned to selected nodes.

replication number

Ratio of replica shards to primary shards across all selected nodes.

total number

Total number of shards assigned to selected nodes.

store object required

Contains statistics about the size of shards assigned to selected nodes.

size number | string

Total size of all shards assigned to selected nodes.

size_in_bytes number required

Total size, in bytes, of all shards assigned to selected nodes.

reserved number | string

A prediction of how much larger the shard stores will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities.

reserved_in_bytes number required

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 number | string

Total data set size 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.

total_data_set_size_in_bytes number

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.

dense_vector object required

Contains statistics about indexed dense vector

value_count number required
sparse_vector object required

Contains statistics about indexed sparse vector

value_count number required
nodes object required

Contains statistics about nodes selected by the request’s node filters.

count object required

Contains counts for nodes selected by the request’s node filters.

total number required
coordinating_only number
data number
data_cold number
data_content number
data_frozen number
data_hot number
data_warm number
index number
ingest number
master number
ml number
remote_cluster_client number
transform number
voting_only number
discovery_types map string to number required

Contains statistics about the discovery types used by selected nodes.

fs object required

Contains statistics about file stores by selected nodes.

path string
mount string
type string
available_in_bytes number

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.

available number | string

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.

free_in_bytes number

Total number, in bytes, of unallocated bytes in file stores across all selected nodes.

free number | string

Total number of unallocated bytes in file stores across all selected nodes.

total_in_bytes number

Total size, in bytes, of all file stores across all selected nodes.

total number | string

Total size of all file stores across all selected nodes.

low_watermark_free_space number | string
low_watermark_free_space_in_bytes number
high_watermark_free_space number | string
high_watermark_free_space_in_bytes number
flood_stage_free_space number | string
flood_stage_free_space_in_bytes number
frozen_flood_stage_free_space number | string
frozen_flood_stage_free_space_in_bytes number
indexing_pressure object required
memory object required
limit number | string

Configured memory limit for the indexing requests. Replica requests have an automatic limit that is 1.5x this value.

limit_in_bytes number

Configured memory limit, in bytes, for the indexing requests. Replica requests have an automatic limit that is 1.5x this value.

total object

Contains statistics for the cumulative indexing load since the node started.

Same fields as current in memory
ingest object required
number_of_pipelines number required
processor_stats map string to object required
<string> object
count number required
current number required
failed number required
time union oneOf
Values: -1 0
time_in_millis number required
jvm object required

Contains statistics about the Java Virtual Machines (JVMs) used by selected nodes.

max_uptime_in_millis number required

Uptime duration, in milliseconds, since JVM last started.

max_uptime union oneOf

Uptime duration since JVM last started.

Values: -1 0
mem object required

Contains statistics about memory used by selected nodes.

heap_max_in_bytes number required

Maximum amount of memory, in bytes, available for use by the heap across all selected nodes.

heap_max number | string

Maximum amount of memory available for use by the heap across all selected nodes.

heap_used_in_bytes number required

Memory, in bytes, currently in use by the heap across all selected nodes.

heap_used number | string

Memory currently in use by the heap across all selected nodes.

threads number required

Number of active threads in use by JVM across all selected nodes.

versions object[] required

Contains statistics about the JVM versions used by selected nodes.

bundled_jdk boolean required

Always true. All distributions come with a bundled Java Development Kit (JDK).

count number required

Total number of selected nodes using JVM.

using_bundled_jdk boolean required

If true, a bundled JDK is in use by JVM.

version string required

Version of JVM used by one or more selected nodes.

vm_name string required

Name of the JVM.

vm_vendor string required

Vendor of the JVM.

vm_version string required

Full version number of JVM. The full version number includes a plus sign (+) followed by the build number.

network_types object required

Contains statistics about the transport and HTTP networks used by selected nodes.

http_types map string to number required

Contains statistics about the HTTP network types used by selected nodes.

transport_types map string to number required

Contains statistics about the transport network types used by selected nodes.

os object required

Contains statistics about the operating systems used by selected nodes.

allocated_processors number required

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.

available_processors number required

Number of processors available to JVM across all selected nodes.

mem object required

Contains statistics about memory used by selected nodes.

adjusted_total_in_bytes number

Total amount, in bytes, of memory across all selected nodes, but using the value specified using the es.total_memory_bytes system property instead of measured total memory for those nodes where that system property was set.

adjusted_total number | string

Total amount of memory across all selected nodes, but using the value specified using the es.total_memory_bytes system property instead of measured total memory for those nodes where that system property was set.

free_in_bytes number required

Amount, in bytes, of free physical memory across all selected nodes.

free number | string

Amount of free physical memory across all selected nodes.

free_percent number required

Percentage of free physical memory across all selected nodes.

total_in_bytes number required

Total amount, in bytes, of physical memory across all selected nodes.

total number | string

Total amount of physical memory across all selected nodes.

used_in_bytes number required

Amount, in bytes, of physical memory in use across all selected nodes.

used number | string

Amount of physical memory in use across all selected nodes.

used_percent number required

Percentage of physical memory in use across all selected nodes.

names object[] required

Contains statistics about operating systems used by selected nodes.

count number required

Number of selected nodes using the operating system.

name string required

Name of an operating system used by one or more selected nodes.

pretty_names object[] required

Contains statistics about operating systems used by selected nodes.

count number required

Number of selected nodes using the operating system.

pretty_name string required

Human-readable name of an operating system used by one or more selected nodes.

packaging_types object[] required

Contains statistics about Elasticsearch distributions installed on selected nodes.

count number required

Number of selected nodes using the distribution flavor and file type.

flavor string required

Type of Elasticsearch distribution. This is always default.

type string required

File type (such as tar or zip) used for the distribution package.

plugins object[] required

Contains statistics about installed plugins and modules by selected nodes. If no plugins or modules are installed, this array is empty.

classname string required
description string required
elasticsearch_version string required
extended_plugins string[] required
has_native_controller boolean required
java_version string required
name string required
version string required
licensed boolean required
native_controller_enabled_settings string[] required
process object required

Contains statistics about processes used by selected nodes.

cpu object required

Contains statistics about CPU used by selected nodes.

percent number required

Percentage of CPU used across all selected nodes. Returns -1 if not supported.

open_file_descriptors object required

Contains statistics about open file descriptors in selected nodes.

avg number required

Average number of concurrently open file descriptors. Returns -1 if not supported.

max number required

Maximum number of concurrently open file descriptors allowed across all selected nodes. Returns -1 if not supported.

min number required

Minimum number of concurrently open file descriptors across all selected nodes. Returns -1 if not supported.

versions string[] required

Array of Elasticsearch versions used on selected nodes.

repositories map string to string to number required

Contains stats on repository feature usage exposed in cluster stats for telemetry.

snapshots object required

Contains stats cluster snapshots.

current_counts object required
snapshots number required

Snapshots currently in progress

shard_snapshots number required

Incomplete shard snapshots

snapshot_deletions number required

Snapshots deletions in progress

concurrent_operations number required

Sum of snapshots and snapshot_deletions

cleanups number required

Cleanups in progress, not counted in concurrent_operations as they are not concurrent

repositories map string to object required
<string> object
type string required
oldest_start_time_millis number required
oldest_start_time string
current_counts object required
snapshots number required
clones number required
finalizations number required
deletions number required
snapshot_deletions number required
active_deletions number required
shards object required
total number required
complete number required
incomplete number required
states map string to number required
status enum

Health status of the cluster, based on the state of its primary and replica shards.

Supported values include:

  • green (or GREEN): All shards are assigned.
  • yellow (or YELLOW): 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 (or RED): 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: green GREEN yellow YELLOW red RED unknown unavailable
timestamp number required

Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed.

ccs object required

Cross-cluster stats

clusters map string to 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.

Information about cross-cluster search usage.

total number required

The total number of cross-cluster search requests that have been executed by the cluster.

success number required

The total number of cross-cluster search requests that have been successfully executed by the cluster.

skipped number required

The total number of cross-cluster search requests (successful or failed) that had at least one remote cluster skipped.

took object required

Statistics about the time taken to execute cross-cluster search requests.

max number required

The maximum time taken to execute a request, in milliseconds.

avg number required

The average time taken to execute a request, in milliseconds.

p90 number required

The 90th percentile of the time taken to execute requests, in milliseconds.

remotes_per_search_max number required

The maximum number of remote clusters that were queried in a single cross-cluster search request.

remotes_per_search_avg number required

The average number of remote clusters that were queried in a single cross-cluster search request.

failure_reasons map string to number required

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.

features map string to number required

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 and wildcard).

clients map string to number required

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 or elasticsearch) are counted.

clusters map string to object required

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).

<string> object
total number required

The total number of successful (not skipped) cross-cluster search requests that were executed against this cluster. This may include requests where partial results were returned, but not requests in which the cluster has been skipped entirely.

skipped number required

The total number of cross-cluster search requests for which this cluster was skipped.

took object required

Statistics about the time taken to execute requests against this cluster.

max number required

The maximum time taken to execute a request, in milliseconds.

avg number required

The average time taken to execute a request, in milliseconds.

p90 number required

The 90th percentile of the time taken to execute requests, in milliseconds.

_esql object

Information about ES|QL cross-cluster query usage.

Same fields as _search in ccs