0
0
Elasticsearchquery~5 mins

Cluster health API in Elasticsearch - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
ADELETE
BGET
CPUT
DPOST
What does a 'yellow' status mean in cluster health?
AAll primary shards are active but some replicas are not
BSome primary shards are not active
CAll primary and replica shards are active
DCluster is offline
Which parameter makes the Cluster Health API wait for a specific status?
Await_for_nodes
Blevel
Ctimeout
Dwait_for_status
What does the 'timed_out' field in the response indicate?
AThe API call timed out before reaching the desired status
BThe cluster is down
CThe cluster is healthy
DThe API call was successful
Which endpoint is used to get health information for a specific index?
A/_cluster/health
B/index_name/_health
C/_cluster/health/index_name
D/_health/index_name
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.