MethodPathDescription
GET/v1/nodes/stats/lastGet latest stats for all nodes
GET/v1/nodes/stats/last/{uid}Get latest stats for a single node

Get latest stats for all nodes

GET /v1/nodes/stats/last

Get latest statistics for all nodes.

Required permissions

Permission name
view_all_nodes_stats

Request

Example HTTP request

GET /nodes/stats/last?interval=1sec&stime=2015-10-14T06:29:43Z

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. Default: 1sec. (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 most recent statistics for all nodes.

Example JSON body

{
    "1": {
         "conns": 0.0,
         "cpu_idle": 0.922500000015134,
         "cpu_system": 0.007499999999708962,
         "cpu_user": 0.01749999999810825,
         "cur_aof_rewrites": 0.0,
         "egress_bytes": 7887.0,
         "ephemeral_storage_avail": 75821363200.0,
         "ephemeral_storage_free": 81189969920.0,
         "etime": "2015-10-14T06:29:44Z",
         "free_memory": 2956963840.0,
         "ingress_bytes": 4950.0,
         "interval": "1sec",
         "persistent_storage_avail": 75821363200.0,
         "persistent_storage_free": 81189969920.0,
         "stime": "2015-10-14T06:29:43Z",
         "total_req": 0.0
     },
     "2": {
         "conns": 0.0,
         "cpu_idle": 0.922500000015134,
         "// additional fields..."
     }
}

Status codes

CodeDescription
200 OKNo error
404 Not FoundNo nodes exist

Get latest node stats

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

Get the latest statistics of a node.

Required permissions

Permission name
view_node_stats

Request

Example HTTP request

GET /nodes/stats/last/1?interval=1sec&stime=2015-10-13T09:01:54Z

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. Default: 1sec. (optional)
stimeISO_8601Start time from which we want the stats. Should comply with the ISO_8601format (optional)
etimeISO_8601End time after which we don’t want the stats. Should comply with the ISO_8601format (optional)

Response

Returns the most recent statistics for the specified node.

Example JSON body

{
    "1": {
         "conns": 0.0,
         "cpu_idle": 0.8049999999930151,
         "cpu_system": 0.02750000000014552,
         "cpu_user": 0.12000000000080036,
         "cur_aof_rewrites": 0.0,
         "egress_bytes": 2169.0,
         "ephemeral_storage_avail": 75920293888.0,
         "ephemeral_storage_free": 81288900608.0,
         "etime": "2015-10-13T09:01:55Z",
         "free_memory": 3285381120.0,
         "ingress_bytes": 3020.0,
         "interval": "1sec",
         "persistent_storage_avail": 75920293888.0,
         "persistent_storage_free": 81288900608.0,
         "stime": "2015-10-13T09:01:54Z",
         "total_req": 0.0
    }
}

Error codes

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