DescribeDomainHealth - Amazon OpenSearch Service

DescribeDomainHealth

Returns information about domain and node health, the standby Availability Zone, number of nodes per Availability Zone, and shard count per node.

Request Syntax

GET /2021-01-01/opensearch/domain/DomainName/health HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

DomainName

The name of the domain.

Length Constraints: Minimum length of 3. Maximum length of 28.

Pattern: [a-z][a-z0-9\-]+

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "ActiveAvailabilityZoneCount": "string", "AvailabilityZoneCount": "string", "ClusterHealth": "string", "DataNodeCount": "string", "DedicatedMaster": boolean, "DomainState": "string", "EnvironmentInformation": [ { "AvailabilityZoneInformation": [ { "AvailabilityZoneName": "string", "AvailableDataNodeCount": "string", "ConfiguredDataNodeCount": "string", "TotalShards": "string", "TotalUnAssignedShards": "string", "ZoneStatus": "string" } ] } ], "MasterEligibleNodeCount": "string", "MasterNode": "string", "StandByAvailabilityZoneCount": "string", "TotalShards": "string", "TotalUnAssignedShards": "string", "WarmNodeCount": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

ActiveAvailabilityZoneCount

The number of active Availability Zones configured for the domain. If the service is unable to fetch this information, it will return NotAvailable.

Type: String

Pattern: ^((\d+)|(NotAvailable))$

AvailabilityZoneCount

The number of Availability Zones configured for the domain. If the service is unable to fetch this information, it will return NotAvailable.

Type: String

Pattern: ^((\d+)|(NotAvailable))$

ClusterHealth

The current health status of your cluster.

  • Red - At least one primary shard is not allocated to any node.

  • Yellow - All primary shards are allocated to nodes, but some replicas aren’t.

  • Green - All primary shards and their replicas are allocated to nodes.

  • NotAvailable - Unable to retrieve cluster health.

Type: String

Valid Values: Red | Yellow | Green | NotAvailable

DataNodeCount

The number of data nodes configured for the domain. If the service is unable to fetch this information, it will return NotAvailable.

Type: String

Pattern: ^((\d+)|(NotAvailable))$

DedicatedMaster

A boolean that indicates if dedicated master nodes are activated for the domain.

Type: Boolean

DomainState

The current state of the domain.

  • Processing - The domain has updates in progress.

  • Active - Requested changes have been processed and deployed to the domain.

Type: String

Valid Values: Active | Processing | NotAvailable

EnvironmentInformation

A list of EnvironmentInfo for the domain.

Type: Array of EnvironmentInfo objects

MasterEligibleNodeCount

The number of nodes that can be elected as a master node. If dedicated master nodes is turned on, this value is the number of dedicated master nodes configured for the domain. If the service is unable to fetch this information, it will return NotAvailable.

Type: String

Pattern: ^((\d+)|(NotAvailable))$

MasterNode

Indicates whether the domain has an elected master node.

  • Available - The domain has an elected master node.

  • UnAvailable - The master node hasn't yet been elected, and a quorum to elect a new master node hasn't been reached.

Type: String

Valid Values: Available | UnAvailable

StandByAvailabilityZoneCount

The number of standby Availability Zones configured for the domain. If the service is unable to fetch this information, it will return NotAvailable.

Type: String

Pattern: ^((\d+)|(NotAvailable))$

TotalShards

The total number of primary and replica shards for the domain.

Type: String

Pattern: ^((\d+)|(NotAvailable))$

TotalUnAssignedShards

The total number of primary and replica shards not allocated to any of the nodes for the cluster.

Type: String

Pattern: ^((\d+)|(NotAvailable))$

WarmNodeCount

The number of warm nodes configured for the domain.

Type: String

Pattern: ^((\d+)|(NotAvailable))$

Errors

For information about the errors that are common to all actions, see Common Errors.

BaseException

An error occurred while processing the request.

HTTP Status Code: 400

DisabledOperationException

An error occured because the client wanted to access an unsupported operation.

HTTP Status Code: 409

InternalException

Request processing failed because of an unknown error, exception, or internal failure.

HTTP Status Code: 500

ResourceNotFoundException

An exception for accessing or deleting a resource that doesn't exist.

HTTP Status Code: 409

ValidationException

An exception for accessing or deleting a resource that doesn't exist.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of DescribeDomainHealth.

Sample Request

GET /2021-01-01/opensearch/domain/amazonrocks/health HTTP/1.1 Host: es.us-east-1.amazonaws.com Accept-Encoding: identity User-Agent: aws-cli/2.15.13 Python/3.11.6 Windows/10 exe/AMD64 prompt/off command/opensearch.describe-domain-health X-Amz-Date: 20240209T222820Z X-Amz-Security-Token: IQoJb3JpZ2luX2VjEEcaCXVz== Authorization: AWS4-HMAC-SHA256 Credential=ASIAU/20240209/us-east-1/es/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=786d6e7ab6725d07b29cde81430b8e57dc2e87e4667c2879de84ab1b94dea451

Sample Response

{ "ActiveAvailabilityZoneCount":"3", "AvailabilityZoneCount":"3", "ClusterHealth":"Green", "DataNodeCount":"3", "DedicatedMaster":false, "DomainState":"Active", "EnvironmentInformation":[ { "AvailabilityZoneInformation":[ { "AvailabilityZoneName":"us-east-1b", "AvailableDataNodeCount":"1", "ConfiguredDataNodeCount":"1", "TotalShards":"6", "TotalUnAssignedShards":"NotAvailable", "ZoneStatus":"Active" }, { "AvailabilityZoneName":"us-east-1c", "AvailableDataNodeCount":"1", "ConfiguredDataNodeCount":"1", "TotalShards":"7", "TotalUnAssignedShards":"NotAvailable", "ZoneStatus":"Active" }, { "AvailabilityZoneName":"us-east-1d", "AvailableDataNodeCount":"1", "ConfiguredDataNodeCount":"1", "TotalShards":"6", "TotalUnAssignedShards":"NotAvailable", "ZoneStatus":"Active" } ] } ], "MasterEligibleNodeCount":"3", "MasterNode":"Available", "StandByAvailabilityZoneCount":"0", "TotalShards":"19", "TotalUnAssignedShards":"0", "WarmNodeCount":"0" }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: