Skip to main content
Skip table of contents

Cluster API

Cluster API allows you to retrieve information on your cluster status. 

Retrieve cluster status

Retrieve cluster nodes status:

CODE
GET /api/monitor/status

JSON Format

NameTypeDescription
restartingBooleantrue if the cluster is restarting.
primaryBooleantrue if the current node is a 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).

Example response

JS
{
  "nodes": [
    {
      "node": "172.18.0.3:19999",
      "node-id": -1,
      "state": "BOOTSTRAP",
      "state-message": "Starting",
      "role": "Secondary Master -1",
      "serving": false,
      "attached": false,
      "current-progress": -1,
      "total-progress": -1,
      "error": false,
      "error-message": "",
      "primary": false,
      "outdated-status": false
    },
    {
      "node": "172.18.0.4: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.5: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": false
}

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.

Is Current node a primary master

When high availability is enabled, this endpoint tells you if you're querying the primary or a secondary master.

CODE
GET /api/monitor/get/master


JSON Format

NameTypeDescription
primaryBooleantrue if this monitor is running on a primary node
secondaryBooleantrue if this monitor is running on a secondary node

Example response

JS
{
  "primary": true,
  "secondary": false
}

Retrieve all up and down nodes

Retrieve all nodes running and down:

CODE
GET /api/monitor/get/nodes

JSON Format

NameTypeDescription
nodesDownArrayList of all nodes down or unattached
nodesUpArrayList of all nodes up and running

Response example

JS
{
  "nodesDown": [],
  "nodesUp": [
    "ip-172-31-33-56.eu-west-1.compute.internal",
    "ip-172-31-33-12.eu-west-1.compute.internal"
  ]
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.