---
type: api
title: Get the cluster health
description: **All methods and paths for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-health-report
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-health-report
products:
  - Elasticsearch
---

# Get the cluster health


Availability: Generally available since 8.7

## Paths

- `GET` `/_health_report/{feature}`
- `GET` `/_health_report`

#### Path parameters

- `feature` (union string | string[]) — optional, leave it out to use `/_health_report`
  A feature of the cluster, as returned by the top-level health report API.

## Description

Get a report with the health status of an Elasticsearch cluster.
The report contains a list of indicators that compose Elasticsearch functionality.

Each indicator has a health status of: green, unknown, yellow or red.
The indicator will provide an explanation and metadata describing the reason for its current health status.

The cluster’s status is controlled by the worst indicator status.

In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue.
Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system.

Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system.
The root cause and remediation steps are encapsulated in a diagnosis.
A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem.

NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently.
When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic.

## Authentication

- Api key: `Authorization: <value>`
  Elasticsearch APIs support key-based authentication.
  You must create an API key and use the encoded value in the request header.
  For example:
  
  
  ```
  curl -X GET "${ES_URL}/_cat/indices?v=true" \
    -H "Authorization: ApiKey ${API_KEY}"
  ```
  
  To get API keys, use the `/_security/api_key` APIs.
- Basic: `Authorization: Basic <credentials>`
- Bearer: `Authorization: Bearer <token>`
  Elasticsearch APIs support the use of bearer tokens in the `Authorization` HTTP header to authenticate with the API.
  For examples, refer to [Token-based authentication services](https://www.elastic.co/guide/en/elasticsearch/reference/current/token-authentication-services.html)

## Query string parameters

- `timeout` (string) — optional
  Explicit operation timeout.
- `verbose` (boolean · default: true) — optional
  Opt-in for more information about the health of the system.
- `size` (number · default: 1000) — optional
  Limit the number of affected resources the health report API returns.

## Response

`application/json`

- `cluster_name` (string)
- `indicators` (object)
  - `master_is_stable` (object)
    - `status` (enum)
      Values: `green`, `yellow`, `red`, `unknown`, `unavailable`
    - `symptom` (string)
    - `impacts` (object[])
      - `description` (string)
      - `id` (string)
      - `impact_areas` (enum[])
        Values: `search`, `ingest`, `backup`, `deployment_management`
      - `severity` (number)
    - `diagnosis` (object[])
      - `id` (string)
      - `action` (string)
      - `affected_resources` (object)
        - `indices` (string)
        - `nodes` (object[])
          - `name` (union string) — nullable
            One of: `string`
          - `node_id` (union string) — nullable
            One of: `string`
        - `slm_policies` (string[])
        - `feature_states` (string[])
        - `snapshot_repositories` (string[])
      - `cause` (string)
      - `help_url` (string)
    - `details` (object)
      - `current_master` (object)
        - `name` (union string) — nullable
          One of: `string`
        - `node_id` (union string) — nullable
          One of: `string`
      - `recent_masters` (object[])
        - `name` (union string) — nullable
          One of: `string`
        - `node_id` (union string) — nullable
          One of: `string`
      - `exception_fetching_history` (object)
        - `message` (string)
        - `stack_trace` (string)
      - `cluster_formation` (object[])
        - `name` (string)
        - `node_id` (string)
        - `cluster_formation_message` (string)
  - `shards_availability` (object)
    - `status` (enum)
      Values: `green`, `yellow`, `red`, `unknown`, `unavailable`
    - `symptom` (string)
    - `impacts` (object[])
      - `description` (string)
      - `id` (string)
      - `impact_areas` (enum[])
        Values: `search`, `ingest`, `backup`, `deployment_management`
      - `severity` (number)
    - `diagnosis` (object[])
      Same fields as `diagnosis` in `master_is_stable`
    - `details` (object)
      - `creating_primaries` (number)
      - `creating_replicas` (number)
      - `initializing_primaries` (number)
      - `initializing_replicas` (number)
      - `restarting_primaries` (number)
      - `restarting_replicas` (number)
      - `started_primaries` (number)
      - `started_replicas` (number)
      - `unassigned_primaries` (number)
      - `unassigned_replicas` (number)
  - `disk` (object)
    - `status` (enum)
      Values: `green`, `yellow`, `red`, `unknown`, `unavailable`
    - `symptom` (string)
    - `impacts` (object[])
      - `description` (string)
      - `id` (string)
      - `impact_areas` (enum[])
        Values: `search`, `ingest`, `backup`, `deployment_management`
      - `severity` (number)
    - `diagnosis` (object[])
      Same fields as `diagnosis` in `master_is_stable`
    - `details` (object)
      - `indices_with_readonly_block` (number)
      - `nodes_with_enough_disk_space` (number)
      - `nodes_over_high_watermark` (number)
      - `nodes_over_flood_stage_watermark` (number)
      - `nodes_with_unknown_disk_status` (number)
  - `repository_integrity` (object)
    - `status` (enum)
      Values: `green`, `yellow`, `red`, `unknown`, `unavailable`
    - `symptom` (string)
    - `impacts` (object[])
      - `description` (string)
      - `id` (string)
      - `impact_areas` (enum[])
        Values: `search`, `ingest`, `backup`, `deployment_management`
      - `severity` (number)
    - `diagnosis` (object[])
      Same fields as `diagnosis` in `master_is_stable`
    - `details` (object)
      - `total_repositories` (number)
      - `corrupted_repositories` (number)
      - `corrupted` (string[])
  - `data_stream_lifecycle` (object)
    - `status` (enum)
      Values: `green`, `yellow`, `red`, `unknown`, `unavailable`
    - `symptom` (string)
    - `impacts` (object[])
      - `description` (string)
      - `id` (string)
      - `impact_areas` (enum[])
        Values: `search`, `ingest`, `backup`, `deployment_management`
      - `severity` (number)
    - `diagnosis` (object[])
      Same fields as `diagnosis` in `master_is_stable`
    - `details` (object)
      - `stagnating_backing_indices_count` (number)
      - `total_backing_indices_in_error` (number)
      - `stagnating_backing_indices` (object[])
        - `index_name` (string)
        - `first_occurrence_timestamp` (number)
        - `retry_count` (number)
  - `ilm` (object)
    - `status` (enum)
      Values: `green`, `yellow`, `red`, `unknown`, `unavailable`
    - `symptom` (string)
    - `impacts` (object[])
      - `description` (string)
      - `id` (string)
      - `impact_areas` (enum[])
        Values: `search`, `ingest`, `backup`, `deployment_management`
      - `severity` (number)
    - `diagnosis` (object[])
      Same fields as `diagnosis` in `master_is_stable`
    - `details` (object)
      - `ilm_status` (enum)
        Values: `RUNNING`, `STOPPING`, `STOPPED`
      - `policies` (number)
      - `stagnating_indices` (number)
  - `slm` (object)
    - `status` (enum)
      Values: `green`, `yellow`, `red`, `unknown`, `unavailable`
    - `symptom` (string)
    - `impacts` (object[])
      - `description` (string)
      - `id` (string)
      - `impact_areas` (enum[])
        Values: `search`, `ingest`, `backup`, `deployment_management`
      - `severity` (number)
    - `diagnosis` (object[])
      Same fields as `diagnosis` in `master_is_stable`
    - `details` (object)
      - `slm_status` (enum)
        Values: `RUNNING`, `STOPPING`, `STOPPED`
      - `policies` (number)
      - `unhealthy_policies` (object)
        - `count` (number)
        - `invocations_since_last_success` (map string to number)
  - `shards_capacity` (object)
    - `status` (enum)
      Values: `green`, `yellow`, `red`, `unknown`, `unavailable`
    - `symptom` (string)
    - `impacts` (object[])
      - `description` (string)
      - `id` (string)
      - `impact_areas` (enum[])
        Values: `search`, `ingest`, `backup`, `deployment_management`
      - `severity` (number)
    - `diagnosis` (object[])
      Same fields as `diagnosis` in `master_is_stable`
    - `details` (object)
      - `data` (object)
        - `max_shards_in_cluster` (number)
        - `current_used_shards` (number)
      - `frozen` (object)
        - `max_shards_in_cluster` (number)
        - `current_used_shards` (number)
- `status` (enum)
  Values: `green`, `yellow`, `red`, `unknown`, `unavailable`
## Code examples

#### Console

```console
GET _health_report
```

#### JavaScript

```javascript
const response = await client.healthReport();
```

#### Python

```python
resp = client.health_report()
```

#### curl

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

#### Java

```java
client.healthReport(h -> h);
```

#### C#

```c#
var response = await client.HealthReportAsync();
```

#### PHP

```php
$resp = $client->healthReport();
```

#### Ruby

```ruby
response = client.health_report
```

