Node stats requests

Node statistics requests

Method Path Description
GET /v1/nodes/stats Get 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

Key Value Description
Host cnm.cluster.fqdn Domain name
Accept application/json Accepted media type

Query parameters

Field Type Description
interval string Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional)
stime ISO_8601 Start time from which we want the stats. Should comply with the ISO_8601 format (optional)
etime ISO_8601 End 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

Code Description
200 OK No error
404 Not Found No 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

Key Value Description
Host cnm.cluster.fqdn Domain name
Accept application/json Accepted media type

URL parameters

Field Type Description
uid integer The unique ID of the node requested.

Query parameters

Field Type Description
interval string Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional)
stime ISO_8601 Start time from which we want the stats. Should comply with the ISO_8601 format (optional)
etime ISO_8601 End 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

Code Description
200 OK No error
404 Not Found Node does not exist
406 Not Acceptable Node isn't currently active
503 Service Unavailable Node is in recovery state
RATE THIS PAGE
Back to top ↑