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.pingIntegerTime took to send a PING command to this node, in ms.
_nodes.attachedBooleanIf the node is attached to the cluster. If not, you should run a re-initialize command.
_nodes.errorStringIf an error occurs during a PING, the message is given in this field.
_nodes.masterIntegerThe master number of this node. The lowest number gives you the current master node, otherwise secondaries master. If the value is -1, the node is a slave.
_nodes.statusStringThe status of the node.
_nodes.stageStringIf the node is initializing, the stage of the initialization.
_nodes.stage-messageStringA user-friendly text explaining the current status of the node.
_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.

Example response

JS
{
  "nodes": [
    {
      "node": "ip-172-31-12-124.eu-west-1.compute.internal",
      "ping": 1,
	  "status":"RUNNING",
      "stage":"NONE",
      "stage-message":"Running", 
      "current-progress":-1,
      "total-progress":-1
      "attached": true,
      "error": "",
      "master": 0
    },
    {
      "node": "ip-172-31-7-12.eu-west-1.compute.internal",
      "ping": 14,
      "status":"RUNNING",
      "stage":"NONE",
      "stage-message":"Running", 
      "current-progress":-1,
      "total-progress":-1
      "attached": true,
      "error": "",
      "master": 1
    },
    {
      "node": "ip-172-31-6-126.eu-west-1.compute.internal",
      "ping": 13,
      "status":"RUNNING",
      "stage":"NONE",
      "stage-message":"Running", 
      "current-progress":-1,
      "total-progress":-1
      "attached": true,
      "error": "",
      "master": -1
    }
  ],
  "restarting": false,
  "primary": true
}

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.