Skip to content

Cluster status ​

Cluster API allows you to retrieve information on your cluster.

Retrieve cluster status ​

GET /api/monitor/status
Retrieve cluster nodes status.

Example:

javascript
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:

NameTypeDescription
restartingBooleanTrue if the cluster is restarting
primaryBooleanTrue if the called node is the primary master node
nodes.nodeStringIP address of the node
nodes.node-idIntegerInteger identifying the node
nodes.stateStringStatus of the node (see Cluster/Node Status)
nodes.state-messageStringDescription of the state
nodes.roleStringCurrent role of the node in the cluster (Primary or Secondary)
nodes.servingBooleanTrue if state is Serving
nodes.attachedBooleanTrue if the node is attached to the cluster
nodes.current-progressStringIf the node is loading the warehouse, the number of tables that have been loaded so far.
nodes.total-progressStringIf the node is loading the warehouse, the total number of remaining tables to load.
nodes.errorBooleanTrue if the node is in error state
nodes.error-messageStringDescription of the error
nodes.primaryBooleanTrue if the node is the primary master
nodes.outdated-statusBooleanTrue if the status of this node is outdated (the node didn't send a status update since more than 5sec)

INFO

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:

text
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:

javascript
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:

javascript
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"
  ]
}