[[cluster-nodes-stats]]
=== Nodes stats API
++++
Nodes stats
++++
..New API reference
[sidebar]
--
For the most up-to-date API details, refer to {api-es}/group/endpoint-cluster[Cluster APIs].
--
Returns cluster nodes statistics.
[[cluster-nodes-stats-api-request]]
==== {api-request-title}
`GET /_nodes/stats` +
`GET /_nodes//stats` +
`GET /_nodes/stats/` +
`GET /_nodes//stats/` +
`GET /_nodes/stats//` +
`GET /_nodes//stats//`
[[cluster-nodes-stats-api-prereqs]]
==== {api-prereq-title}
* If the {es} {security-features} are enabled, you must have the `monitor` or
`manage` <> to use this API.
[[cluster-nodes-stats-api-desc]]
==== {api-description-title}
You can use the cluster nodes stats API to retrieve statistics for nodes in a cluster.
All the nodes selective options are explained <>.
By default, all stats are returned.
You can limit the returned information by using metrics.
[[cluster-nodes-stats-api-path-params]]
==== {api-path-parms-title}
``::
(Optional, string) Limits the information returned to the specific metrics.
A comma-separated list of the following options:
+
--
`adaptive_selection`::
Statistics about <>.
`allocations`::
Statistics about allocated shards
`breaker`::
Statistics about the field data circuit breaker.
`discovery`::
Statistics about the discovery.
`fs`::
File system information, data path, free disk space, read/write stats.
`http`::
HTTP connection information.
`indexing_pressure`::
Statistics about the node's indexing load and related rejections.
`indices`::
Indices stats about size, document count, indexing and deletion times, search times, field cache size, merges and flushes.
`ingest`::
Statistics about ingest preprocessing.
`jvm`::
JVM stats, memory pool information, garbage collection, buffer pools, number of loaded/unloaded classes.
`os`::
Operating system stats, load average, mem, swap.
`process`::
Process statistics, memory consumption, cpu usage, open file descriptors.
`repositories`::
Statistics about snapshot repositories.
`thread_pool`::
Statistics about each thread pool, including current size, queue and rejected tasks.
`transport`::
Transport statistics about sent and received bytes in cluster communication.
--
``::
(Optional, string) Limit the information returned for `indices` metric to the specific index metrics.
It can be used only if `indices` (or `all`) metric is specified.
Supported metrics are:
+
--
* `bulk`
* `completion`
* `docs`
* `fielddata`
* `flush`
* `get`
* `indexing`
* `mappings`
* `merge`
* `query_cache`
* `recovery`
* `refresh`
* `request_cache`
* `search`
* `segments`
* `shard_stats`
* `store`
* `translog`
* `warmer`
* `dense_vector`
* `sparse_vector`
--
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=node-id]
[[cluster-nodes-stats-api-query-params]]
==== {api-query-parms-title}
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=completion-fields]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=fielddata-fields]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=fields]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=groups]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=level]
`types`::
(Optional, string) A comma-separated list of document types for the
`indexing` index metric.
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=timeout-nodes-request]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=include-segment-file-sizes]
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=include-unloaded-segments]
[role="child_attributes"]
[[cluster-nodes-stats-api-response-body]]
==== {api-response-body-title}
`_nodes`::
(object) Contains statistics about the number of nodes selected by the request.
+
.Properties of `_nodes`
[%collapsible%open]
====
`total`::
(integer) Total number of nodes selected by the request.
`successful`::
(integer) Number of nodes that responded successfully to the request.
`failed`::
(integer) 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.
====
`cluster_name`::
(string) Name of the cluster.
Based on the <> setting.
`nodes`::
(object) Contains statistics for the nodes selected by the request.
+
.Properties of `nodes`
[%collapsible%open]
====
``::
(object) Contains statistics for the node.
+
.Properties of ``
[%collapsible%open]
=====
`timestamp`::
(integer) Time the node stats were collected for this response.
Recorded in milliseconds since the {wikipedia}/Unix_time[Unix Epoch].
`name`::
(string) Human-readable identifier for the node.
Based on the <> setting.
`transport_address`::
(string) Host and port for the <>, used for internal communication between nodes in a cluster.
`host`::
(string) Network host for the node, based on the <> setting.
`ip`::
(string) IP address and port for the node.
`roles`::
(array of strings) Roles assigned to the node.
See <>.
`attributes`::
(object) Contains a list of attributes for the node.
[[cluster-nodes-stats-api-response-body-indices]]
`indices`::
(object) Contains statistics about indices with shards assigned to the node.
+
.Properties of `indices`
[%collapsible%open]
======
`docs`::
(object) Contains statistics about documents across all primary shards assigned to the node.
+
.Properties of `docs`
[%collapsible%open]
=======
`count`::
(integer)
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=docs-count]
`deleted`::
(integer)
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=docs-deleted]
=======
`store`::
(object) Contains statistics about the size of shards assigned to the node.
+
.Properties of `store`
[%collapsible%open]
=======
`size`::
(<>) Total size of all shards assigned to the node.
`size_in_bytes`::
(integer) Total size, in bytes, of all shards assigned to the node.
`total_data_set_size`::
(<>) Total data set size of all shards assigned to the node.
This includes the size of shards not stored fully on the node, such as the cache for <>.
`total_data_set_size_in_bytes`::
(integer) Total data set size, in bytes, of all shards assigned to the node.
This includes the size of shards not stored fully on the node, such as the cache for <>.
`reserved`::
(<>) A prediction of how much larger the shard stores on this node will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities.
A value of `-1b` indicates that this is not available.
`reserved_in_bytes`::
(integer) A prediction, in bytes, of how much larger the shard stores on this node will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities.
A value of `-1` indicates that this is not available.
=======
`indexing`::
(object) Contains statistics about indexing operations for the node.
+
.Properties of `indexing`
[%collapsible%open]
=======
`index_total`::
(integer) Total number of indexing operations.
`index_time`::
(<>) Total time spent performing indexing operations.
`index_time_in_millis`::
(integer) Total time in milliseconds spent performing indexing operations.
`index_current`::
(integer) Number of indexing operations currently running.
`index_failed`::
(integer) Number of failed indexing operations.
`delete_total`::
(integer) Total number of deletion operations.
`delete_time`::
(<>) Time spent performing deletion operations.
`delete_time_in_millis`::
(integer) Time in milliseconds spent performing deletion operations.
`delete_current`::
(integer) Number of deletion operations currently running.
`noop_update_total`::
(integer) Total number of noop operations.
`is_throttled`::
(Boolean) Number of times operations were throttled.
`throttle_time`::
(<>) Total time spent throttling operations.
`throttle_time_in_millis`::
(integer) Total time in milliseconds spent throttling operations.
`write_load`::
(double) Average number of write threads used while indexing documents.
=======
`get`::
(object) Contains statistics about get operations for the node.
+
.Properties of `get`
[%collapsible%open]
=======
`total`::
(integer) Total number of get operations.
`getTime`::
(<>) Time spent performing get operations.
`time_in_millis`::
(integer) Time in milliseconds spent performing get operations.
`exists_total`::
(integer) Total number of successful get operations.
`exists_time`::
(<>) Time spent performing successful get operations.
`exists_time_in_millis`::
(integer) Time in milliseconds spent performing successful get operations.
`missing_total`::
(integer) Total number of failed get operations.
`missing_time`::
(<>) Time spent performing failed get operations.
`missing_time_in_millis`::
(integer) Time in milliseconds spent performing failed get operations.
`current`::
(integer) Number of get operations currently running.
=======
`search`::
(object) Contains statistics about search operations for the node.
+
.Properties of `search`
[%collapsible%open]
=======
`open_contexts`::
(integer) Number of open search contexts.
`query_total`::
(integer) Total number of query operations.
`query_time`::
(<>) Time spent performing query operations.
`query_time_in_millis`::
(integer) Time in milliseconds spent performing query operations.
`query_current`::
(integer) Number of query operations currently running.
`fetch_total`::
(integer) Total number of fetch operations.
`fetch_time`::
(<>) Time spent performing fetch operations.
`fetch_time_in_millis`::
(integer) Time in milliseconds spent performing fetch operations.
`fetch_current`::
(integer) Number of fetch operations currently running.
`scroll_total`::
(integer) Total number of scroll operations.
`scroll_time`::
(<>) Time spent performing scroll operations.
`scroll_time_in_millis`::
(integer) Time in milliseconds spent performing scroll operations.
`scroll_current`::
(integer) Number of scroll operations currently running.
`suggest_total`::
(integer) Total number of suggest operations.
`suggest_time`::
(<>) Time spent performing suggest operations.
`suggest_time_in_millis`::
(integer) Time in milliseconds spent performing suggest operations.
`suggest_current`::
(integer) Number of suggest operations currently running.
=======
`merges`::
(object) Contains statistics about merge operations for the node.
+
.Properties of `merges`
[%collapsible%open]
=======
`current`::
(integer) Number of merge operations currently running.
`current_docs`::
(integer) Number of document merges currently running.
`current_size`::
(<>) Memory used performing current document merges.
`current_size_in_bytes`::
(integer) Memory, in bytes, used performing current document merges.
`total`::
(integer) Total number of merge operations.
`total_time`::
(<>) Total time spent performing merge operations.
`total_time_in_millis`::
(integer) Total time in milliseconds spent performing merge operations.
`total_docs`::
(integer) Total number of merged documents.
`total_size`::
(<>) Total size of document merges.
`total_size_in_bytes`::
(integer) Total size of document merges in bytes.
`total_stopped_time`::
(<>) Total time spent stopping merge operations.
`total_stopped_time_in_millis`::
(integer) Total time in milliseconds spent stopping merge operations.
`total_throttled_time`::
(<>) Total time spent throttling merge operations.
`total_throttled_time_in_millis`::
(integer) Total time in milliseconds spent throttling merge operations.
`total_auto_throttle`::
(<>) Size of automatically throttled merge operations.
`total_auto_throttle_in_bytes`::
(integer) Size, in bytes, of automatically throttled merge operations.
=======
`refresh`::
(object) Contains statistics about refresh operations for the node.
+
.Properties of `refresh`
[%collapsible%open]
=======
`total`::
(integer) Total number of refresh operations.
`total_time`::
(<>) Total time spent performing refresh operations.
`total_time_in_millis`::
(integer) Total time in milliseconds spent performing refresh operations.
`external_total`::
(integer) Total number of external refresh operations.
`external_total_time`::
(<>) Total time spent performing external operations.
`external_total_time_in_millis`::
(integer) Total time in milliseconds spent performing external operations.
`listeners`::
(integer) Number of refresh listeners.
=======
`flush`::
(object) Contains statistics about flush operations for the node.
+
.Properties of `flush`
[%collapsible%open]
=======
`total`::
(integer) Number of flush operations.
`periodic`::
(integer) Number of flush periodic operations.
`total_time`::
(<>) Total time spent performing flush operations.
`total_time_in_millis`::
(integer) Total time in milliseconds spent performing flush operations.
=======
`warmer`::
(object) Contains statistics about index warming operations for the node.
+
.Properties of `warmer`
[%collapsible%open]
=======
`current`::
(integer) Number of active index warmers.
`total`::
(integer) Total number of index warmers.
`total_time`::
(<>) Total time spent performing index warming operations.
`total_time_in_millis`::
(integer) Total time in milliseconds spent performing index warming operations.
=======
`query_cache`::
(object) Contains statistics about the query cache across all shards assigned to the node.
+
.Properties of `query_cache`
[%collapsible%open]
=======
`memory_size`::
(<>) Total amount of memory used for the query cache across all shards assigned to the node.
`memory_size_in_bytes`::
(integer) Total amount of memory, in bytes, used for the query cache across all shards assigned to the node.
`total_count`::
(integer) Total count of hits, misses, and cached queries in the query cache.
`hit_count`::
(integer) Number of query cache hits.
`miss_count`::
(integer) Number of query cache misses.
`cache_size`::
(integer) Current number of cached queries.
`cache_count`::
(integer) Total number of all queries that have been cached.
`evictions`::
(integer) Number of query cache evictions.
=======
`fielddata`::
(object) Contains statistics about the field data cache across all shards assigned to the node.
+
.Properties of `fielddata`
[%collapsible%open]
=======
`memory_size`::
(<>) Total amount of memory used for the field data cache across all shards assigned to the node.
`memory_size_in_bytes`::
(integer) Total amount of memory, in bytes, used for the field data cache across all shards assigned to the node.
`evictions`::
(integer) Number of fielddata evictions.
=======
`completion`::
(object) Contains statistics about completions across all shards assigned to the node.
+
.Properties of `completion`
[%collapsible%open]
=======
`size`::
(<>) Total amount of memory used for completion across all shards assigned to the node.
`size_in_bytes`::
(integer) Total amount of memory, in bytes, used for completion across all shards assigned to the node.
=======
`segments`::
(object) Contains statistics about segments across all shards assigned to the node.
+
.Properties of `segments`
[%collapsible%open]
=======
`count`::
(integer) Number of segments.
`memory`::
(<>) Total amount of memory used for segments across all shards assigned to the node.
`memory_in_bytes`::
(integer) Total amount of memory, in bytes, used for segments across all shards assigned to the node.
`terms_memory`::
(<>) Total amount of memory used for terms across all shards assigned to the node.
`terms_memory_in_bytes`::
(integer) Total amount of memory, in bytes, used for terms across all shards assigned to the node.
`stored_fields_memory`::
(<>) Total amount of memory used for stored fields across all shards assigned to the node.
`stored_fields_memory_in_bytes`::
(integer) Total amount of memory, in bytes, used for stored fields across all shards assigned to the node.
`term_vectors_memory`::
(<>) Total amount of memory used for term vectors across all shards assigned to the node.
`term_vectors_memory_in_bytes`::
(integer) Total amount of memory, in bytes, used for term vectors across all shards assigned to the node.
`norms_memory`::
(<>) Total amount of memory used for normalization factors across all shards assigned to the node.
`norms_memory_in_bytes`::
(integer) Total amount of memory, in bytes, used for normalization factors across all shards assigned to the node.
`points_memory`::
(<>) Total amount of memory used for points across all shards assigned to the node.
`points_memory_in_bytes`::
(integer) Total amount of memory, in bytes, used for points across all shards assigned to the node.
`doc_values_memory`::
(<>) Total amount of memory used for doc values across all shards assigned to the node.
`doc_values_memory_in_bytes`::
(integer) Total amount of memory, in bytes, used for doc values across all shards assigned to the node.
`index_writer_memory`::
(<>) Total amount of memory used by all index writers across all shards assigned to the node.
`index_writer_memory_in_bytes`::
(integer) Total amount of memory, in bytes, used by all index writers across all shards assigned to the node.
`version_map_memory`::
(<>) Total amount of memory used by all version maps across all shards assigned to the node.
`version_map_memory_in_bytes`::
(integer) Total amount of memory, in bytes, used by all version maps across all shards assigned to the node.
`fixed_bit_set`::
(<>) Total amount of memory used by fixed bit sets across all shards assigned to the node.
+
Fixed bit sets are used for nested object field types and type filters for <> fields.
`fixed_bit_set_memory_in_bytes`::
(integer) Total amount of memory, in bytes, used by fixed bit sets across all shards assigned to the node.
+
Fixed bit sets are used for nested object field types and type filters for <> fields.
`max_unsafe_auto_id_timestamp`::
(integer) Time of the most recently retried indexing request.
Recorded in milliseconds since the {wikipedia}/Unix_time[Unix Epoch].
`file_sizes`::
(object) Contains statistics about the size of the segment file.
+
.Properties of `file_sizes`
[%collapsible%open]
========
`size`::
(<>) Size of the segment file.
`size_in_bytes`::
(integer) Size, in bytes, of the segment file.
`description`::
(string) Description of the segment file.
========
=======
`translog`::
(object) Contains statistics about transaction log operations for the node.
+
.Properties of `translog`
[%collapsible%open]
=======
`operations`::
(integer) Number of transaction log operations.
`size`::
(<>) Size of the transaction log.
`size_in_bytes`::
(integer) Size, in bytes, of the transaction log.
`uncommitted_operations`::
(integer) Number of uncommitted transaction log operations.
`uncommitted_size`::
(<>) Size of uncommitted transaction log operations.
`uncommitted_size_in_bytes`::
(integer) Size, in bytes, of uncommitted transaction log operations.
`earliest_last_modified_age`::
(integer) Earliest last modified age for the transaction log.
=======
`request_cache`::
(object) Contains statistics about the request cache across all shards assigned to the node.
+
.Properties of `request_cache`
[%collapsible%open]
=======
`memory_size`::
(<>) Memory used by the request cache.
`memory_size_in_bytes`::
(integer) Memory, in bytes, used by the request cache.
`evictions`::
(integer) Number of request cache operations.
`hit_count`::
(integer) Number of request cache hits.
`miss_count`::
(integer) Number of request cache misses.
=======
`recovery`::
(object) Contains statistics about recovery operations for the node.
+
.Properties of `recovery`
[%collapsible%open]
=======
`current_as_source`::
(integer) Number of recoveries that used an index shard as a source.
`current_as_target`::
(integer) Number of recoveries that used an index shard as a target.
`throttle_time`::
(<>) Time by which recovery operations were delayed due to throttling.
`throttle_time_in_millis`::
(integer) Time in milliseconds recovery operations were delayed due to throttling.
=======
`shard_stats`::
(object) Contains statistics about all shards assigned to the node.
+
.Properties of `shard_stats`
[%collapsible%open]
=======
`total_count`::
(integer) The total number of shards assigned to the node.
=======
`mappings`::
(object) Contains statistics about the mappings for the node.
This is not shown for the `shards` level, since mappings may be shared across the shards of an index on a node.
+
.Properties of `mappings`
[%collapsible%open]
=======
`total_count`::
(integer) Number of mappings, including <> and <