---
type: api
title: Get cluster info
description: Returns basic information about the cluster.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-cluster-info
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-cluster-info
products:
  - Elasticsearch
---

# Get cluster info

Availability: 8.9+

## Paths

- `GET` `/_info/{target}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#bearerauth)

#### Path Parameters

- `target` (union ClusterInfoTarget | [] ClusterInfoTarget)
  Limits the information returned to the specific target. Supports a comma-separated list, such as http,ingest.

Supported values include: `_all`, `http`, `ingest`, `thread_pool`, `script`
  Values: `_all`, `http`, `ingest`, `thread_pool`, `script`

## Description

Returns basic information about the cluster.

## Response

`application/json`

- `cluster_name` (string Name)
- `http` ({} Http)
  - `current_open` (number)
    Current number of open HTTP connections for the node.
  - `total_opened` (number)
    Total number of HTTP connections opened for the node.
  - `clients` ([] Client)
    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.
    - `id` (number)
      Unique ID for the HTTP client.
    - `agent` (string)
      Reported agent for the HTTP client.
If unavailable, this property is not included in the response.
    - `local_address` (string)
      Local address for the HTTP connection.
    - `remote_address` (string)
      Remote address for the HTTP connection.
    - `last_uri` (string)
      The URI of the client’s most recent request.
    - `opened_time_millis` (number)
      Time at which the client opened the connection.
    - `closed_time_millis` (number)
      Time at which the client closed the connection if the connection is closed.
    - `last_request_time_millis` (number)
      Time of the most recent request from this client.
    - `request_count` (number)
      Number of requests from this client.
    - `request_size_bytes` (number)
      Cumulative size in bytes of all requests from this client.
    - `x_opaque_id` (string)
      Value from the client’s `x-opaque-id` HTTP header.
If unavailable, this property is not included in the response.
  - `routes` (map string to HttpRoute)
    Detailed HTTP stats broken down by route
    Map values ({} HttpRoute)
    - `requests` ({} HttpRouteRequests)
      - `count` (number)
      - `total_size_in_bytes` (number)
      - `size_histogram` ([] SizeHttpHistogram)
        - `count` (number)
        - `ge_bytes` (number)
        - `lt_bytes` (number)
    - `responses` ({} HttpRouteResponses)
      - `count` (number)
      - `total_size_in_bytes` (number)
      - `handling_time_histogram` ([] TimeHttpHistogram)
        - `count` (number)
        - `ge_millis` (number)
        - `lt_millis` (number)
      - `size_histogram` ([] SizeHttpHistogram)
        - `count` (number)
        - `ge_bytes` (number)
        - `lt_bytes` (number)
- `ingest` ({} Ingest)
  - `pipelines` (map string to IngestStats)
    Contains statistics about ingest pipelines for the node.
    Map values ({} IngestStats)
    - `count` (number)
      Total number of documents ingested during the lifetime of this node.
    - `current` (number)
      Total number of documents currently being ingested.
    - `failed` (number)
      Total number of failed ingest operations during the lifetime of this node.
    - `processors` ([] string to KeyedProcessor)
      Total number of ingest processors.
    - `time_in_millis` (DurationValueUnitMillis)
      Total time, in milliseconds, spent preprocessing ingest documents during the lifetime of this node.
    - `ingested_as_first_pipeline_in_bytes` (number)
      Total number of bytes of all documents ingested by the pipeline.
This field is only present on pipelines which are the first to process a document.
Thus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors.
    - `produced_as_first_pipeline_in_bytes` (number)
      Total number of bytes of all documents produced by the pipeline.
This field is only present on pipelines which are the first to process a document.
Thus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors.
In situations where there are subsequent pipelines, the value represents the size of the document after all pipelines have run.
  - `total` ({} IngestTotal)
    Contains statistics about ingest operations for the node.
    - `count` (number)
      Total number of documents ingested during the lifetime of this node.
    - `current` (number)
      Total number of documents currently being ingested.
    - `failed` (number)
      Total number of failed ingest operations during the lifetime of this node.
    - `time_in_millis` (DurationValueUnitMillis)
      Total time, in milliseconds, spent preprocessing ingest documents during the lifetime of this node.
- `thread_pool` (map string to ThreadCount)
  Map values ({} ThreadCount)
  - `active` (number)
    Number of active threads in the thread pool.
  - `completed` (number)
    Number of tasks completed by the thread pool executor.
  - `largest` (number)
    Highest number of active threads in the thread pool.
  - `queue` (number)
    Number of tasks in queue for the thread pool.
  - `rejected` (number)
    Number of tasks rejected by the thread pool executor.
  - `threads` (number)
    Number of threads in the thread pool.
- `script` ({} Scripting)
  - `cache_evictions` (number)
    Total number of times the script cache has evicted old data.
  - `compilations` (number)
    Total number of inline script compilations performed by the node.
  - `compilations_history` (map string to number)
    Contains this recent history of script compilations.
  - `compilation_limit_triggered` (number)
    Total number of times the script compilation circuit breaker has limited inline script compilations.
  - `contexts` ([] Context)
    - `context` (string)
    - `compilations` (number)
    - `cache_evictions` (number)
    - `compilation_limit_triggered` (number)
## Code Examples

#### Console

```console
GET /_info/_all
```

#### JavaScript

```javascript
const response = await client.cluster.info({
  target: "_all",
});
```

#### Python

```python
resp = client.cluster.info(
    target="_all",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_info/_all" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.cluster().info(i -> i
    .target("_all")
);
```

#### C#

```c#
var response = await client.Cluster.InfoAsync(target: [ClusterInfoTarget.All]);
```

#### PHP

```php
$resp = $client->cluster()->info([
    "target" => "_all",
]);
```

#### Ruby

```ruby
response = client.cluster.info(
  target: "_all"
)
```

