MethodPathDescription
GET/v1/nodes/statsGet stats for all nodes
GET/v1/nodes/stats/{uid}Get stats for a single node

Get all nodes stats

GET /v1/nodes/stats

Get statistics for all nodes.

Required permissions

Permission name
view_all_nodes_stats

Request

Example HTTP request

GET /nodes/stats?interval=1hour&stime=2014-08-28T10:00:00Z

Request headers

KeyValueDescription
Hostcnm.cluster.fqdnDomain name
Acceptapplication/jsonAccepted media type

Query parameters

FieldTypeDescription
intervalstringTime interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional)
stimeISO_8601Start time from which we want the stats. Should comply with the ISO_8601 format (optional)
etimeISO_8601End time after which we don’t want the stats. Should comply with the ISO_8601 format (optional)

Response

Returns a JSON array of statistics for all nodes.

Example JSON body

[
  {
    "uid": "1",
    "intervals": [
    {
      "interval": "1sec",
      "stime": "2015-05-28T08:40:11Z",
      "etime": "2015-05-28T08:40:12Z",
      "conns": 0.0,
      "cpu_idle": 0.5499999999883585,
      "cpu_system": 0.03499999999985448,
      "cpu_user": 0.38000000000101863,
      "egress_bytes": 0.0,
      "ephemeral_storage_avail": 2929315840.0,
      "ephemeral_storage_free": 3977830400.0,
      "free_memory": 893485056.0,
      "ingress_bytes": 0.0,
      "persistent_storage_avail": 2929315840.0,
      "persistent_storage_free": 3977830400.0,
      "total_req": 0.0
    },
    {
      "interval": "1sec",
      "stime": "2015-05-28T08:40:12Z",
      "etime": "2015-05-28T08:40:13Z",
      "cpu_idle": 1.2,
      "// additional fields..."
    }
   ]
  },
  {
    "uid": "2",
    "intervals": [
    {
      "interval": "1sec",
      "stime": "2015-05-28T08:40:11Z",
      "etime": "2015-05-28T08:40:12Z",
      "conns": 0.0,
      "cpu_idle": 0.5499999999883585,
      "cpu_system": 0.03499999999985448,
      "cpu_user": 0.38000000000101863,
      "egress_bytes": 0.0,
      "ephemeral_storage_avail": 2929315840.0,
      "ephemeral_storage_free": 3977830400.0,
      "free_memory": 893485056.0,
      "ingress_bytes": 0.0,
      "persistent_storage_avail": 2929315840.0,
      "persistent_storage_free": 3977830400.0,
      "total_req": 0.0
    },
    {
      "interval": "1sec",
      "stime": "2015-05-28T08:40:12Z",
      "etime": "2015-05-28T08:40:13Z",
      "cpu_idle": 1.2,
      "// additional fields..."
    }
   ]
  }
]

Status codes

CodeDescription
200 OKNo error
404 Not FoundNo nodes exist

Get node stats

GET /v1/nodes/stats/{int: uid}

Get statistics for a node.

Required permissions

Permission name
view_node_stats

Request

Example HTTP request

GET /nodes/stats/1?interval=1hour&stime=2014-08-28T10:00:00Z

Request headers

KeyValueDescription
Hostcnm.cluster.fqdnDomain name
Acceptapplication/jsonAccepted media type

URL parameters

FieldTypeDescription
uidintegerThe unique ID of the node requested.

Query parameters

FieldTypeDescription
intervalstringTime interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional)
stimeISO_8601Start time from which we want the stats. Should comply with the ISO_8601 format (optional)
etimeISO_8601End time after which we don’t want the stats. Should comply with the ISO_8601 format (optional)

Response

Returns statistics for the specified node.

Example JSON body

{
  "uid": "1",
  "intervals": [
    {
      "interval": "1sec",
      "stime": "2015-05-28T08:40:11Z",
      "etime": "2015-05-28T08:40:12Z",
      "conns": 0.0,
      "cpu_idle": 0.5499999999883585,
      "cpu_system": 0.03499999999985448,
      "cpu_user": 0.38000000000101863,
      "egress_bytes": 0.0,
      "ephemeral_storage_avail": 2929315840.0,
      "ephemeral_storage_free": 3977830400.0,
      "free_memory": 893485056.0,
      "ingress_bytes": 0.0,
      "persistent_storage_avail": 2929315840.0,
      "persistent_storage_free": 3977830400.0,
      "total_req": 0.0
    },
    {
      "interval": "1sec",
      "stime": "2015-05-28T08:40:12Z",
      "etime": "2015-05-28T08:40:13Z",
      "cpu_idle": 1.2,
      "// additional fields..."
    }
  ]
}

Status codes

CodeDescription
200 OKNo error
404 Not FoundNode does not exist
406 Not AcceptableNode isn’t currently active
503 Service UnavailableNode is in recovery state