Cluster status
Cluster API allows you to retrieve information on your cluster.
Retrieve cluster status
GET /api/monitor/status
Retrieve cluster nodes status.
Example:
curl http://myindeximacluster:8082/api/monitor/status \
-H "Authorization: $ACCESS_TOKEN" \
-H "Monitor-Target-Host: indexima-core-1" \
-H "Monitor-Target-Port: 9999" \
--compressed -s | jq
{
"nodes": [
{
"node": "172.18.0.2:19999",
"node-id": 0,
"state": "SERVE",
"state-message": "Serving",
"role": "Primary Master",
"serving": true,
"attached": true,
"current-progress": -1,
"total-progress": -1,
"error": false,
"error-message": "",
"primary": true,
"outdated-status": false
},
{
"node": "172.18.0.4:19999",
"node-id": 1,
"state": "SERVE",
"state-message": "Serving",
"role": "Secondary Master 1",
"serving": true,
"attached": true,
"current-progress": -1,
"total-progress": -1,
"error": false,
"error-message": "",
"primary": false,
"outdated-status": false
}
],
"restarting": false,
"primary": true
}
Reply JSON Format:
Name | Type | Description |
---|---|---|
restarting | Boolean | True if the cluster is restarting |
primary | Boolean | True if the called node is the primary master node |
nodes.node | String | IP address of the node |
nodes.node-id | Integer | Integer identifying the node |
nodes.state | String | Status of the node (see Cluster/Node Status) |
nodes.state-message | String | Description of the state |
nodes.role | String | Current role of the node in the cluster (Primary or Secondary) |
nodes.serving | Boolean | True if state is Serving |
nodes.attached | Boolean | True if the node is attached to the cluster |
nodes.current-progress | String | If the node is loading the warehouse, the number of tables that have been loaded so far. |
nodes.total-progress | String | If the node is loading the warehouse, the total number of remaining tables to load. |
nodes.error | Boolean | True if the node is in error state |
nodes.error-message | String | Description of the error |
nodes.primary | Boolean | True if the node is the primary master |
nodes.outdated-status | Boolean | True if the status of this node is outdated (the node didn't send a status update since more than 5sec) |
Please note the outdated-status
field: if this field is true, it means the status has not been updated by the node since more than 5sec. It's likely that this node is down, or can't communicate with the rest of the cluster.
Retrieve cluster version
GET /api/monitor/version
Get current cluster version.
Example:
curl http://myindeximacluster:8082/api/monitor/get/version \
-H "Authorization: $ACCESS_TOKEN" \
-H "Monitor-Target-Host: indexima-core-1" \
-H "Monitor-Target-Port: 9999" \
--compressed
{"version":"2022.3.1757"}
Is called node a primary master
GET /api/monitor/get/master
This endpoint tells if you're querying the primary or a secondary master.
Example:
curl http://myindeximacluster:8082/api/monitor/get/master \
-H "Authorization: $ACCESS_TOKEN" \
-H "Monitor-Target-Host: indexima-core-1" \
-H "Monitor-Target-Port: 9999" \
--compressed
{"primary":true,"secondary":false}
Retrieve up and down nodes
GET /api/monitor/get/nodes
Retrieve list of all nodes running and down.
Example:
curl http://myindeximacluster:8082/api/monitor/get/nodes \
-H "Authorization: $ACCESS_TOKEN" \
-H "Monitor-Target-Host: indexima-core-1" \
-H "Monitor-Target-Port: 9999" \
--compressed -s | jq
{
"nodesDown": [],
"nodesUp": [
"172.18.0.5:19999",
"172.18.0.4:19999",
"172.18.0.3:19999",
"172.18.0.6:19999"
]
}