This API is used to query the health status of a specified cluster. If any component is unavailable, the abnormal cluster health status is returned.
GET /web/v1/cluster/{cluster_id}/status
Parameter |
Mandatory or Not |
Description |
|---|---|---|
cluster_id |
Yes |
Cluster ID that is displayed on MRS Manager. The default cluster ID is 1, because MRS Manager supports management of only one cluster currently. |
HTTP/1.1 200 OK
Data:Wed,02 May 2018 10:10:01 GMT
Server: example-server
Content-Type: application/json
{
"id": 0,
"state": "COMPLETE",
"error_code": 0,
"error_description": "string",
"total_progress": 0,
"res_obj": {
"state": "GOOD"
}
}
Parameter |
Mandatory or Not |
Type |
Description |
|---|---|---|---|
id |
No |
LONG |
Asynchronous task ID (meaningless in other scenarios). The default value is -1. |
state |
No |
STRING |
Cluster status. The value FAILED indicates that the command fails to be executed. The value COMPLETE indicates that the command is successfully executed. |
error_code |
No |
INTEGER |
Error code returned |
error_description |
No |
STRING |
Error code description |
total_progress |
No |
FLOAT |
Total progress |
res_obj |
No |
REFERENCE |
Response object |
Parameter |
Mandatory or Not |
Type |
Description |
|---|---|---|---|
state |
Yes |
STRING |
Cluster health status Good: The cluster is healthy. Bad: The cluster is unhealthy. |
Status Code |
Description |
|---|---|
200 |
The operation is successful. |
For details about error status codes, see Status Codes.