Get node statistics

GET /_nodes/stats/{metric}/{index_metric}

Get statistics for nodes in a cluster. By default, all stats are returned. You can limit the returned information by using metrics.

Path parameters

  • metricstring | array[string] Required

    Limit the information returned to the specified metrics

  • index_metricstring | array[string] Required

    Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified.

Query parameters

  • completion_fieldsstring | array[string]

    Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.

  • fielddata_fieldsstring | array[string]

    Comma-separated list or wildcard expressions of fields to include in fielddata statistics.

  • fieldsstring | array[string]

    Comma-separated list or wildcard expressions of fields to include in the statistics.

  • groupsboolean

    Comma-separated list of search groups to include in the search statistics.

  • If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).

  • levelstring

    Indicates whether statistics are aggregated at the cluster, index, or shard level.

    Values are cluster, indices, or shards.

  • timeoutstring

    Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • typesarray[string]

    A comma-separated list of document types for the indexing index metric.

  • If true, the response includes information from segments that are not loaded into memory.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • _nodesobject
      Hide _nodes attributes Show _nodes attributes object
      • failuresarray[object]
        Hide failures attributes Show failures attributes object
        • typestring Required

          The type of error

        • reasonstring

          A human-readable explanation of the error, in English.

        • The server stack trace. Present only if the error_trace=true parameter was sent with the request.

        • caused_byobject
        • root_causearray[object]
        • suppressedarray[object]
      • totalnumber Required

        Total number of nodes selected by the request.

      • successfulnumber Required

        Number of nodes that responded successfully to the request.

      • failednumber Required

        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.

    • nodesobject Required
      Hide nodes attribute Show nodes attribute object
      • *object Additional properties
        Hide * attributes Show * attributes object
        • Statistics about adaptive replica selection.

          Hide adaptive_selection attribute Show adaptive_selection attribute object
          • *object Additional properties
            Hide * attributes Show * attributes object
            • The exponentially weighted moving average queue size of search requests on the keyed node.

            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • The exponentially weighted moving average response time, in nanoseconds, of search requests on the keyed node.

            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • The exponentially weighted moving average service time, in nanoseconds, of search requests on the keyed node.

            • The number of outstanding search requests to the keyed node from the node these stats are for.

            • rankstring

              The rank of this node; used for shard selection when routing search requests.

        • breakersobject

          Statistics about the field data circuit breaker.

          Hide breakers attribute Show breakers attribute object
          • *object Additional properties
            Hide * attributes Show * attributes object
            • Estimated memory used for the operation.

            • Estimated memory used, in bytes, for the operation.

            • Memory limit for the circuit breaker.

            • Memory limit, in bytes, for the circuit breaker.

            • overheadnumber

              A constant that all estimates for the circuit breaker are multiplied with to calculate a final estimate.

            • trippednumber

              Total number of times the circuit breaker has been triggered and prevented an out of memory error.

        • fsobject
          Hide fs attributes Show fs attributes object
          • dataarray[object]

            List of all file stores.

          • timestampnumber

            Last time the file stores statistics were refreshed. Recorded in milliseconds since the Unix Epoch.

          • totalobject
            Hide total attributes Show total attributes object
            • availablestring

              Total disk space available to this Java virtual machine on all file stores. Depending on OS or process level restrictions, this might appear less than free. This is the actual amount of free disk space the Elasticsearch node can utilise.

            • Total number of bytes available to this Java virtual machine on all file stores. Depending on OS or process level restrictions, this might appear less than free_in_bytes. This is the actual amount of free disk space the Elasticsearch node can utilise.

            • freestring

              Total unallocated disk space in all file stores.

            • Total number of unallocated bytes in all file stores.

            • totalstring

              Total size of all file stores.

            • Total size of all file stores in bytes.

          • io_statsobject
            Hide io_stats attributes Show io_stats attributes object
            • devicesarray[object]

              Array of disk metrics for each device that is backing an Elasticsearch data path. These disk metrics are probed periodically and averages between the last probe and the current probe are computed.

            • totalobject
        • hoststring
        • httpobject
          Hide http attributes Show http attributes object
          • Current number of open HTTP connections for the node.

          • Total number of HTTP connections opened for the node.

          • clientsarray[object]

            Information on current and recently-closed HTTP client connections. Clients that have been closed longer than the http.client_stats.closed_channels.max_age setting will not be represented here.

          • routesobject Required Added in 8.12.0

            Detailed HTTP stats broken down by route

            Hide routes attribute Show routes attribute object
            • *object Additional properties
        • ingestobject
          Hide ingest attributes Show ingest attributes object
          • pipelinesobject

            Contains statistics about ingest pipelines for the node.

            Hide pipelines attribute Show pipelines attribute object
            • *object Additional properties
          • totalobject
            Hide total attributes Show total attributes object
            • countnumber Required

              Total number of documents ingested during the lifetime of this node.

            • currentnumber Required

              Total number of documents currently being ingested.

            • failednumber Required

              Total number of failed ingest operations during the lifetime of this node.

        • ipstring | array[string]

          IP address and port for the node.

        • jvmobject
          Hide jvm attributes Show jvm attributes object
          • Contains statistics about JVM buffer pools for the node.

            Hide buffer_pools attribute Show buffer_pools attribute object
            • *object Additional properties
          • classesobject
            Hide classes attributes Show classes attributes object
          • gcobject
            Hide gc attribute Show gc attribute object
            • Contains statistics about JVM garbage collectors for the node.

          • memobject
            Hide mem attributes Show mem attributes object
          • threadsobject
            Hide threads attributes Show threads attributes object
            • countnumber

              Number of active threads in use by JVM.

            • Highest number of threads used by JVM.

          • timestampnumber

            Last time JVM statistics were refreshed.

          • uptimestring

            Human-readable JVM uptime. Only returned if the human query parameter is true.

          • JVM uptime in milliseconds.

        • namestring
        • osobject
          Hide os attributes Show os attributes object
          • cpuobject
            Hide cpu attributes Show cpu attributes object
            • percentnumber
            • sysstring

              A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • totalstring

              A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • userstring

              A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • swapobject
            Hide swap attributes Show swap attributes object
          • cgroupobject
            Hide cgroup attributes Show cgroup attributes object
          • timestampnumber
        • processobject
          Hide process attributes Show process attributes object
          • cpuobject
            Hide cpu attributes Show cpu attributes object
            • percentnumber
            • sysstring

              A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • totalstring

              A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • userstring

              A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • memobject
            Hide mem attributes Show mem attributes object
          • Number of opened file descriptors associated with the current or -1 if not supported.

          • Maximum number of file descriptors allowed on the system, or -1 if not supported.

          • timestampnumber

            Last time the statistics were refreshed. Recorded in milliseconds since the Unix Epoch.

        • rolesarray[string]
          • @doc_id node-roles

          Values are master, data, data_cold, data_content, data_frozen, data_hot, data_warm, client, ingest, ml, voting_only, transform, remote_cluster_client, or coordinating_only.

        • scriptobject
          Hide script attributes Show script attributes object
          • Total number of times the script cache has evicted old data.

          • Total number of inline script compilations performed by the node.

          • Contains this recent history of script compilations.

            Hide compilations_history attribute Show compilations_history attribute object
            • *number Additional properties
          • Total number of times the script compilation circuit breaker has limited inline script compilations.

          • contextsarray[object]
        • Statistics about each thread pool, including current size, queue and rejected tasks.

          Hide thread_pool attribute Show thread_pool attribute object
          • *object Additional properties
            Hide * attributes Show * attributes object
            • activenumber

              Number of active threads in the thread pool.

            • completednumber

              Number of tasks completed by the thread pool executor.

            • largestnumber

              Highest number of active threads in the thread pool.

            • queuenumber

              Number of tasks in queue for the thread pool.

            • rejectednumber

              Number of tasks rejected by the thread pool executor.

            • threadsnumber

              Number of threads in the thread pool.

        • timestampnumber
        • transportobject
          Hide transport attributes Show transport attributes object
          • The distribution of the time spent handling each inbound message on a transport thread, represented as a histogram.

          • The distribution of the time spent sending each outbound transport message on a transport thread, represented as a histogram.

          • rx_countnumber

            Total number of RX (receive) packets received by the node during internal cluster communication.

          • rx_sizestring

            Size of RX packets received by the node during internal cluster communication.

          • Size, in bytes, of RX packets received by the node during internal cluster communication.

          • Current number of inbound TCP connections used for internal communication between nodes.

          • tx_countnumber

            Total number of TX (transmit) packets sent by the node during internal cluster communication.

          • tx_sizestring

            Size of TX packets sent by the node during internal cluster communication.

          • Size, in bytes, of TX packets sent by the node during internal cluster communication.

          • The cumulative number of outbound transport connections that this node has opened since it started. Each transport connection may comprise multiple TCP connections but is only counted once in this statistic. Transport connections are typically long-lived so this statistic should remain constant in a stable cluster.

        • Contains a list of attributes for the node.

          Hide attributes attribute Show attributes attribute object
          • *string Additional properties
        • discoveryobject
          Hide discovery attributes Show discovery attributes object
          • Hide cluster_state_queue attributes Show cluster_state_queue attributes object
            • totalnumber

              Total number of cluster states in queue.

            • pendingnumber

              Number of pending cluster states in queue.

            • committednumber

              Number of committed cluster states in queue.

          • Hide published_cluster_states attributes Show published_cluster_states attributes object
            • Number of published cluster states.

            • Number of incompatible differences between published cluster states.

            • Number of compatible differences between published cluster states.

          • Contains low-level statistics about how long various activities took during cluster state updates while the node was the elected master. Omitted if the node is not master-eligible. Every field whose name ends in _time within this object is also represented as a raw number of milliseconds in a field whose name ends in _time_millis. The human-readable fields with a _time suffix are only returned if requested with the ?human=true query parameter.

            Hide cluster_state_update attribute Show cluster_state_update attribute object
            • *object Additional properties
          • Hide serialized_cluster_states attributes Show serialized_cluster_states attributes object
          • Hide cluster_applier_stats attribute Show cluster_applier_stats attribute object
        • Hide indexing_pressure attribute Show indexing_pressure attribute object
          • memoryobject
            Hide memory attributes Show memory attributes object
            • Configured memory limit, in bytes, for the indexing requests. Replica requests have an automatic limit that is 1.5x this value.

            • currentobject
            • totalobject
        • indicesobject
          Hide indices attributes Show indices attributes object
          • commitobject
            Hide commit attributes Show commit attributes object
          • Hide completion attributes Show completion attributes object
            • size_in_bytesnumber Required

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

            • fieldsobject
          • docsobject
            Hide docs attributes Show docs attributes object
            • countnumber 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.

            • deletednumber

              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.

          • fielddataobject
            Hide fielddata attributes Show fielddata attributes object
          • flushobject
            Hide flush attributes Show flush attributes object
            • periodicnumber Required
            • totalnumber Required
            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • getobject
            Hide get attributes Show get attributes object
            • currentnumber Required
            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • exists_totalnumber Required
            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • missing_totalnumber Required
            • timestring

              A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • totalnumber Required
          • indexingobject
            Hide indexing attributes Show indexing attributes object
            • index_currentnumber Required
            • delete_currentnumber Required
            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • delete_totalnumber Required
            • is_throttledboolean Required
            • noop_update_totalnumber Required
            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • index_totalnumber Required
            • index_failednumber Required
            • typesobject
          • mappingsobject
            Hide mappings attributes Show mappings attributes object
          • mergesobject
            Hide merges attributes Show merges attributes object
          • Hide shard_path attributes Show shard_path attributes object
          • Hide query_cache attributes Show query_cache attributes object
          • recoveryobject
            Hide recovery attributes Show recovery attributes object
            • current_as_sourcenumber Required
            • current_as_targetnumber Required
            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • refreshobject
            Hide refresh attributes Show refresh attributes object
            • external_totalnumber Required
            • listenersnumber Required
            • totalnumber Required
            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • Hide request_cache attributes Show request_cache attributes object
          • Hide retention_leases attributes Show retention_leases attributes object
          • routingobject
            Hide routing attributes Show routing attributes object
          • segmentsobject
            Hide segments attributes Show segments attributes object
          • seq_noobject
            Hide seq_no attributes Show seq_no attributes object
          • storeobject
            Hide store attributes Show store attributes object
            • size_in_bytesnumber Required

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

            • reserved_in_bytesnumber 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, 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.

          • translogobject
            Hide translog attributes Show translog attributes object
          • warmerobject
            Hide warmer attributes Show warmer attributes object
            • currentnumber Required
            • totalnumber Required
            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • bulkobject
            Hide bulk attributes Show bulk attributes object
            • total_operationsnumber Required
            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • total_size_in_bytesnumber Required
            • avg_timestring

              A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • avg_size_in_bytesnumber Required
          • shardsobject
            Hide shards attribute Show shards attribute object
            • *object Additional properties
          • Hide shard_stats attribute Show shard_stats attribute object
          • indicesobject Additional properties
            Hide indices attributes Show indices attributes object
GET /_nodes/stats/{metric}/{index_metric}
curl \
 --request GET 'http://api.example.com/_nodes/stats/{metric}/{index_metric}' \
 --header "Authorization: $API_KEY"