Challenge - 5 Problems
Cluster Health Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate1:30remaining
What is the output of this cluster health API call?
Given the following Elasticsearch cluster health API request, what is the value of the
status field in the response?Elasticsearch
GET /_cluster/health
Response example:
{
"cluster_name": "my_cluster",
"status": "green",
"timed_out": false,
"number_of_nodes": 3,
"number_of_data_nodes": 2,
"active_primary_shards": 10,
"active_shards": 20,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 0
}Attempts:
2 left
💡 Hint
Look at the
status field in the JSON response.✗ Incorrect
The
status field in the cluster health API response indicates the health of the cluster. Here, it is "green", meaning all primary and replica shards are allocated.🧠 Conceptual
intermediate1:30remaining
What does the
unassigned_shards field indicate in cluster health?In the Elasticsearch cluster health API response, what does the
unassigned_shards field represent?Attempts:
2 left
💡 Hint
Think about shards that are missing or waiting to be assigned.
✗ Incorrect
The
unassigned_shards field shows how many shards are not currently allocated to any node, which can indicate problems in the cluster.❓ Predict Output
advanced1:30remaining
What is the output of this filtered cluster health API call?
Given this request to get cluster health only for the index
logs-2023, what will be the value of active_shards in the response?Elasticsearch
GET /_cluster/health/logs-2023
Response example:
{
"cluster_name": "my_cluster",
"status": "yellow",
"timed_out": false,
"number_of_nodes": 3,
"number_of_data_nodes": 2,
"active_primary_shards": 5,
"active_shards": 7,
"relocating_shards": 1,
"initializing_shards": 0,
"unassigned_shards": 2
}Attempts:
2 left
💡 Hint
Check the
active_shards field in the response.✗ Incorrect
The
active_shards field shows the total number of shards (primary and replica) that are active for the specified index.❓ Predict Output
advanced1:30remaining
What error does this invalid cluster health API request produce?
What error will this request produce?
GET /_cluster/health?level=invalid_level
Elasticsearch
GET /_cluster/health?level=invalid_level
Attempts:
2 left
💡 Hint
The
level parameter accepts only specific values like cluster, indices, or shards.✗ Incorrect
Using an invalid value for the
level parameter causes Elasticsearch to return a 400 Bad Request error explaining the invalid parameter.🧠 Conceptual
expert2:00remaining
How does the cluster health API determine the overall cluster status?
Which of the following best describes how Elasticsearch determines the overall
status field in the cluster health API response?Attempts:
2 left
💡 Hint
Think about shard allocation and its impact on cluster health colors.
✗ Incorrect
The cluster health status is green when all primary and replica shards are allocated, yellow when all primary shards are allocated but some replicas are missing, and red when any primary shard is unassigned.