Get Management Node HA Status
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/management-nodes/zsha2/statusParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| systemTags (Optional) | List | query | System tags | 4.10.20 | |
| userTags (Optional) | List | query | User tags | 4.10.20 |
API Response
Response Example
{
"inventory": {
"vip": "172.26.30.7",
"uiHttpPath": "https://172.26.30.7:443",
"nodes": [
{
"ip": "172.26.21.212",
"gatewayIp": "172.26.0.1",
"ownsVip": true,
"peerReachable": true,
"gatewayReachable": true,
"vipReachable": true,
"keepalivedStatus": "active",
"haMonitorStatus": "active",
"databaseStatus": "mysqld is alive",
"uiStatus": "running",
"managementsNodeStatus": "running",
"slaveIoRunning": true,
"slaveSqlRunning": true
},
{
"ip": "172.26.30.106",
"gatewayIp": "172.26.0.1",
"ownsVip": false,
"peerReachable": true,
"gatewayReachable": true,
"vipReachable": true,
"keepalivedStatus": "active",
"haMonitorStatus": "active",
"databaseStatus": "mysqld is alive",
"uiStatus": "running",
"managementsNodeStatus": "running",
"slaveIoRunning": true,
"slaveSqlRunning": true
}
]
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | Whether the retrieval succeeded | 4.10.20 |
| inventory | ZSha2StatusView | For details, see inventory | 4.10.20 |
| error | ErrorCode | For details, see error | 4.10.20 |
inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| vip | String | The VIP address | 4.10.20 |
| uiHttpPath | String | The UI HTTP path | 4.10.20 |
| nodes | List | For details, see nodes | 4.10.20 |
nodes
| Name | Type | Description | Starting Version |
|---|---|---|---|
| ip | String | The Management Node IP | 4.10.20 |
| gatewayIp | String | The gateway IP | 4.10.20 |
| ownsVip | boolean | Whether the node owns the VIP | 4.10.20 |
| peerReachable | boolean | Whether the peer Management Node is reachable | 4.10.20 |
| gatewayReachable | boolean | Whether the gateway is reachable | 4.10.20 |
| vipReachable | boolean | Whether the VIP is reachable | 4.10.20 |
| keepalivedStatus | String | The keepalived service status, typically 'alive' | 4.10.20 |
| haMonitorStatus | String | The HA monitor service status, typically 'alive' | 4.10.20 |
| databaseStatus | String | The database status, typically 'mysqld is alive' | 4.10.20 |
| uiStatus | String | The UI status, typically 'running' | 4.10.20 |
| managementsNodeStatus | String | The Management Node status, typically 'running' | 4.10.20 |
| slaveIoRunning | boolean | Whether the Slave IO is running | 4.10.20 |
| slaveSqlRunning | boolean | Whether the Slave SQL is running | 4.10.20 |
| error | ErrorCode | The error information from the last operation | 4.10.20 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001. | 0.6 |
| description | String | A brief description of the error. | 0.6 |
| details | String | The detailed error information. | 0.6 |
| elaboration | String | A reserved field. Default is null. | 0.6 |
| opaque | LinkedHashMap | A reserved field. Default is null. | 0.6 |
| cause | ErrorCode | The root error. The source error that caused the current error. If there is no root error, this field is null. | 0.6 |
SDK Examples
Java SDK
GetZSha2StatusAction action = new GetZSha2StatusAction();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetZSha2StatusAction.Result res = action.call();Python SDK
action = GetZSha2StatusAction()
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()