Latest database stats requests
Most recent database statistics requests
| Redis Enterprise Software | 
|---|
| Method | Path | Description | 
|---|---|---|
| GET | /v1/bdbs/stats/last | Get most recent stats for all databases | 
| GET | /v1/bdbs/stats/last/{uid} | Get most recent stats for a specific database | 
Get latest stats for all databases
GET /v1/bdbs/stats/last
Get the most recent statistics for all databases.
Required permissions
| Permission name | Roles | 
|---|---|
| view_all_bdb_stats | admin cluster_member cluster_viewer db_member db_viewer user_manager | 
Request
Example HTTP request
- 
Without metrics filter (returns all metrics by default) GET /v1/bdbs/stats/last
- 
With metrics filter GET /v1/bdbs/stats/last?metrics=no_of_keys,used_memory
Request headers
| Key | Value | Description | 
|---|---|---|
| Host | cnm.cluster.fqdn | Domain name | 
| Accept | application/json | Accepted media type | 
Query parameters
| Field | Type | Description | 
|---|---|---|
| metrics | string | Comma-separated list of metric names for which we want statistics (default is all). (optional) | 
Response
Returns statistics for all databases.
Example JSON body
- 
Without metrics filter (returns all metrics by default) { "1": { "stime": "2015-05-28T08:06:37Z", "etime": "2015-05-28T08:06:44Z", "conns": 0.0, "egress_bytes": 0.0, "etime": "2015-05-28T08:06:44Z", "evicted_objects": 0.0, "expired_objects": 0.0, "ingress_bytes": 0.0, "instantaneous_ops_per_sec": 0.0, "last_req_time": "1970-01-01T00:00:00Z", "last_res_time": "1970-01-01T00:00:00Z", "used_memory": 5651336.0, "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 }, "2": { "stime": "2015-05-28T08:06:37Z", "etime": "2015-05-28T08:06:44Z", "// additional fields..." }, "// Additional BDBs..." }
- 
With metrics filter { "1": { "etime": "2015-05-28T08:06:44Z", "used_memory": 5651576.0, "no_of_keys": 0.0, "stime": "2015-05-28T08:06:37Z" }, "2": { "etime": "2015-05-28T08:06:44ZZ", "used_memory": 5651440.0, "no_of_keys": 0.0, "stime": "2015-05-28T08:06:37Z" }, "// Additional BDBs.." }
Status codes
| Code | Description | 
|---|---|
| 200 OK | No error | 
| 404 Not Found | No bdbs exist | 
Get latest database stats
GET /v1/bdbs/stats/last/{int: uid}
Get the most recent statistics for a specific database.
Permissions
| Permission name | Roles | 
|---|---|
| view_bdb_stats | admin cluster_member cluster_viewer db_member db_viewer user_manager | 
Request
Example HTTP request
GET /v1/bdbs/stats/last/1?metrics=no_of_keys,used_memory
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 requested BDB. | 
Query parameters
| Field | Type | Description | 
|---|---|---|
| metrics | string | Comma-separated list of metric names for which we want statistics (default is all). (optional) | 
Response
Returns the most recent statistics for a specific database.
Example JSON body
{
   "1": {
     "etime": "2015-06-23T12:05:08Z",
     "used_memory": 5651576.0,
     "no_of_keys": 0.0,
     "stime": "2015-06-23T12:05:03Z"
   }
}
Status codes
| Code | Description | 
|---|---|
| 200 OK | No error | 
| 404 Not Found | bdb does not exist | 
| 406 Not Acceptable | bdb isn't currently active | 
| 503 Service Unavailable | bdb is in recovery state |