younifyd
Menu

Health (GET /_cluster/health/{index})

Health

GET/_cluster/health/{index}

Use it in a workflow

  1. Add a step and choose the OpenSearch connector.
  2. Pick the Health (GET /_cluster/health/{index}) action (under cluster).
  3. Fill in the fields below, then reference the result from later steps as {{healthGetClusterHealthIndex.response.data}}.

Request

Path parameters

indexoneOfrequired

A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`.

Query parameters

awareness_attributestring

The name of the awareness attribute for which to return the cluster health status (for example, `zone`). Applicable only if `level` is set to `awareness_attributes`.

cluster_manager_timeoutstring

The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).

expand_wildcardsoneOf

Specifies the type of index that wildcard expressions can match. Supports comma-separated values.

levelstring

Controls the amount of detail included in the cluster health response.

One ofawareness_attributesclusterindicesshards

localboolean

Whether to return information from the local node only instead of from the cluster manager node.

Default false

master_timeoutstring

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.

timeoutstring

The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).

wait_for_active_shardsoneOf

Waits until the specified number of shards is active before returning a response. Use `all` for all shards.

wait_for_eventsoneOf

Waits until all currently queued events with the given priority are processed.

wait_for_no_initializing_shardsboolean

Whether to wait until there are no initializing shards in the cluster.

Default false

wait_for_no_relocating_shardsboolean

Whether to wait until there are no relocating shards in the cluster.

Default false

wait_for_nodesoneOf

Waits until the specified number of nodes (`N`) is available. Accepts `>=N`, `<=N`, `>N`, and `<N`. You can also use `ge(N)`, `le(N)`, `gt(N)`, and `lt(N)` notation.

wait_for_statusoneOf

Waits until the cluster health reaches the specified status or better.

prettyboolean

Whether to pretty-format the returned JSON response.

Default false

humanboolean

Whether to return human-readable values for statistics.

Default false

error_traceboolean

Whether to include the stack trace of returned errors.

Default false

sourcestring

The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

filter_pathoneOf

A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.

Response

Returns 200 with an object. Read it in later steps with {{healthGetClusterHealthIndex.response.data.<field>}}.

active_primary_shardsinteger (int32)

The number of active primary shards.

active_shardsinteger (int32)

The total number of active primary and replica shards.

active_shards_percentstring

The percentage value as a string.

active_shards_percent_as_numbernumber (double)

The percentage value as a number.

awareness_attributesobject

Cluster health information for each awareness attribute.

cluster_namestring

The name of a resource or configuration element.

delayed_unassigned_shardsinteger (int32)

The number of shards whose allocation has been delayed by the timeout settings.

discovered_masterboolean

True if the cluster-manager node has been discovered.

discovered_cluster_managerboolean

True if the cluster-manager node has been discovered.

indicesobject
initializing_shardsinteger (int32)

The number of shards that are under initialization.

number_of_data_nodesinteger (int32)

The number of nodes that are dedicated data nodes.

number_of_in_flight_fetchinteger (int32)

The number of unfinished fetches.

number_of_nodesinteger (int32)

The number of nodes within the cluster.

number_of_pending_tasksinteger (int32)

The number of cluster-level changes that have not yet been executed.

relocating_shardsinteger (int32)

The number of shards that are under relocation.

statusoneOf
task_max_waiting_in_queuestring

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.

task_max_waiting_in_queue_millisinteger (int64)

The time unit for milliseconds.

timed_outboolean

If `false` the response returned within the period of time that is specified by the timeout parameter (`30s` by default).

unassigned_shardsinteger (int32)

The number of shards that are not allocated.

json
{
  "active_primary_shards": 0,
  "active_shards": 0,
  "active_shards_percent_as_number": 0,
  "cluster_name": "string",
  "delayed_unassigned_shards": 0,
  "initializing_shards": 0,
  "number_of_data_nodes": 0,
  "number_of_in_flight_fetch": 0,
  "number_of_nodes": 0,
  "number_of_pending_tasks": 0,
  "relocating_shards": 0,
  "status": null
}

Need more? See the OpenSearch guide for connection setup and behaviour shared by every action.