Recall & Review
beginner
What is the purpose of the Cluster Health API in Elasticsearch?
The Cluster Health API provides information about the health status of an Elasticsearch cluster, including the status of nodes, shards, and indices to help monitor cluster stability and performance.
Click to reveal answer
beginner
What are the possible health status values returned by the Cluster Health API?
The health status can be green (all primary and replica shards are active), yellow (all primary shards are active but some replicas are not), or red (some primary shards are not active).
Click to reveal answer
beginner
How do you request the cluster health status using the Elasticsearch REST API?
You send a GET request to
/_cluster/health. For example: GET /_cluster/health returns the overall cluster health.Click to reveal answer
intermediate
What does the
wait_for_status parameter do in the Cluster Health API?It makes the API call wait until the cluster reaches the specified health status (green, yellow, or red) or until a timeout occurs, useful for monitoring or automation.
Click to reveal answer
intermediate
What key information does the Cluster Health API response include?
The response includes cluster name, status, number of nodes, number of data nodes, active primary shards, active shards, relocating shards, initializing shards, unassigned shards, and timed_out flag.
Click to reveal answer
Which HTTP method is used to check cluster health in Elasticsearch?
✗ Incorrect
The Cluster Health API uses the GET method to retrieve health information.
What does a 'yellow' status mean in cluster health?
✗ Incorrect
Yellow means all primary shards are active but some replica shards are not.
Which parameter makes the Cluster Health API wait for a specific status?
✗ Incorrect
The 'wait_for_status' parameter waits until the cluster reaches the specified health status.
What does the 'timed_out' field in the response indicate?
✗ Incorrect
The 'timed_out' field shows if the API call timed out waiting for the cluster to reach the requested status.
Which endpoint is used to get health information for a specific index?
✗ Incorrect
You append the index name to the cluster health endpoint to get health info for that index.
Explain how the Cluster Health API helps monitor an Elasticsearch cluster.
Think about what information you get and how it shows cluster stability.
You got /4 concepts.
Describe the meaning of green, yellow, and red statuses in the Cluster Health API.
Relate the colors to shard availability.
You got /3 concepts.