---
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/operation/operation-health-report
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/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/docs/deploy-manage/users-roles/cluster-or-deployment-auth/token-based-authentication-services)

## 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)
  - `file_settings` (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)
      - `failure_streak` (number)
      - `most_recent_failure` (string)
  - `project_encryption_key` (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)
      - `active_key_id` (string)
      - `active_password_id` (string)
      - `encryption_required` (boolean)
        Whether callers must refuse to store secrets when the service is not ready.
If `false`, callers may fall back to storing secrets in plaintext (with a warning).
      - `key_count` (number)
      - `metadata_password_id` (string)
      - `state` (string)
  - `dlm_frozen_transitions` (object)
    Reports the health of data stream lifecycle transitions of backing indices to the frozen tier.
    - `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)
      - `transitions_enabled` (boolean)
        Indicates whether frozen-tier transitions are enabled by the `dlm.frozen_transitions.enabled` cluster setting.
      - `service_running` (boolean)
        Indicates whether the frozen transition service is running on the current master node.
      - `default_repository_configured` (boolean)
        Indicates whether a default snapshot repository is configured with the `repositories.default_repository` cluster setting.
      - `overdue_indices_count` (number)
        The total number of overdue indices in the cluster.
      - `overdue_indices_count_by_state` (map string to number)
        The number of overdue indices in the cluster for each transition state.
Only present when there are overdue indices.
      - `overdue_indices_sample` (object[])
        A sample of the overdue indices and their transition states, sorted by index name.
The sample is limited to 100 indices for each transition state, so it can contain fewer indices than `overdue_indices_count`.
Only present when there are overdue indices.
        - `index_name` (string)
          The name of the overdue index.
        - `transition_state` (enum)
          The transition state of the overdue index.

Supported values include:
  - `unmarked`: The index is eligible for a frozen-tier transition but the data stream lifecycle has not marked it for conversion.
  - `marked`: The index is marked for conversion but has not been submitted to the transition executor.
  - `queued`: The index has been submitted to the transition executor and is waiting in its queue for a thread.
  - `running`: The transition of the index is in progress.
          Values: `unmarked`, `marked`, `queued`, `running`
      - `generated_at_millis` (number)
        The time, in milliseconds since the Unix epoch, when the master node generated the health snapshot.
Only present when the indicator status is `unknown`, meaning the health snapshot is stale.
- `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
```

