Method |
Path |
Description |
GET |
/v1/bdbs/stats |
Get stats for all databases |
GET |
/v1/bdbs/stats/{uid} |
Get stats for a specific database |
Get all database stats
GET /v1/bdbs/stats
Get statistics for all databases.
Required permissions
Request
Example HTTP request
GET /bdbs/stats?interval=1hour&stime=2014-08-28T10:00:00Z
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 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 all databases.
Example JSON body
[
{
"uid": "1",
"intervals": [
{
"interval": "1hour",
"stime": "2015-05-27T12:00:00Z",
"etime": "2015-05-28T12:59:59Z",
"avg_latency": 0.0,
"conns": 0.0,
"egress_bytes": 0.0,
"etime": "2015-05-28T00:00:00Z",
"evicted_objects": 0.0,
"expired_objects": 0.0,
"ingress_bytes": 0.0,
"instantaneous_ops_per_sec": 0.00011973180076628352,
"last_req_time": "1970-01-01T00:00:00Z",
"last_res_time": "1970-01-01T00:00:00Z",
"used_memory": 5656299.362068966,
"mem_size_lua": 35840.0,
"monitor_sessions_count": 0.0,
"no_of_keys": 0.0,
"other_req": 0.0,
"other_res": 0.0,
"read_hits": 0.0,
"read_misses": 0.0,
"read_req": 0.0,
"read_res": 0.0,
"total_connections_received": 0.0,
"total_req": 0.0,
"total_res": 0.0,
"write_hits": 0.0,
"write_misses": 0.0,
"write_req": 0.0,
"write_res": 0.0
},
{
"interval": "1hour",
"interval": "1hour",
"stime": "2015-05-27T13:00:00Z",
"etime": "2015-05-28T13:59:59Z",
"avg_latency": 599.08,
"// additional fields..."
}
]
},
{
"uid": "2",
"intervals": [
{
"interval": "1hour",
"stime": "2015-05-27T12:00:00Z",
"etime": "2015-05-28T12:59:59Z",
"avg_latency": 0.0,
"// additional fields..."
},
{
"interval": "1hour",
"stime": "2015-05-27T13:00:00Z",
"etime": "2015-05-28T13:59:59Z",
"// additional fields..."
}
]
}
]
Status codes
Get database stats
GET /v1/bdbs/stats/{int: uid}
Get statistics for a specific database.
Required permissions
Request
Example HTTP request
GET /bdbs/stats/1?interval=1hour&stime=2014-08-28T10:00:00Z
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 BDB requested. |
Query parameters
Field |
Type |
Description |
interval |
string |
Time interval for 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 a specific database.
Example JSON body
{
"uid": "1",
"intervals": [
{
"interval": "1hour",
"stime": "2015-05-27T12:00:00Z",
"etime": "2015-05-28T12:59:59Z",
"avg_latency": 0.0,
"conns": 0.0,
"egress_bytes": 0.0,
"evicted_objects": 0.0,
"pubsub_channels": 0,
"pubsub_patterns": 0,
"expired_objects": 0.0,
"ingress_bytes": 0.0,
"instantaneous_ops_per_sec": 0.00011973180076628352,
"last_req_time": "1970-01-01T00:00:00Z",
"last_res_time": "1970-01-01T00:00:00Z",
"used_memory": 5656299.362068966,
"mem_size_lua": 35840.0,
"monitor_sessions_count": 0.0,
"no_of_keys": 0.0,
"other_req": 0.0,
"other_res": 0.0,
"read_hits": 0.0,
"read_misses": 0.0,
"read_req": 0.0,
"read_res": 0.0,
"total_connections_received": 0.0,
"total_req": 0.0,
"total_res": 0.0,
"write_hits": 0.0,
"write_misses": 0.0,
"write_req": 0.0,
"write_res": 0.0
},
{
"interval": "1hour",
"stime": "2015-05-27T13:00:00Z",
"etime": "2015-05-28T13:59:59Z",
"// additional fields..."
}
]
}
Status codes