MethodPathDescription
GET/v1/bdbs/{bdb_uid}/peer_statsGet stats for all CRDB peer instances
GET/v1/bdbs/{bdb_uid}/peer_stats/{uid}Get stats for a specific CRDB peer instance

Get all CRDB peer stats

GET /v1/bdbs/{bdb_uid}/peer_stats

Get statistics for all peer instances of a local CRDB instance.

Permissions

Permission nameRoles
view_bdb_statsadmin
cluster_member
cluster_viewer
db_member
db_viewer

Request

Example HTTP request

GET /bdbs/1/peer_stats?interval=5min

Headers

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

URL parameters

FieldTypeDescription
bdb_uidintegerThe unique ID of the local CRDB instance.

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 all CRDB peer instances.

Example JSON body

{ "peer_stats": [
     {
         "intervals": [
             {
                 "egress_bytes": 0.0,
                 "egress_bytes_decompressed": 0.0,
                 "etime": "2017-10-22T19:30:00Z",
                 "ingress_bytes": 18528,
                 "ingress_bytes_decompressed": 185992,
                 "interval": "5min",
                 "local_ingress_lag_time": 0.244,
                 "pending_local_writes_max": 0.0,
                 "pending_local_writes_min": 0.0,
                 "stime": "2017-10-22T19:25:00Z"
             },
             {
                 "egress_bytes": 0.0,
                 "egress_bytes_decompressed": 0.0,
                 "etime": "2017-10-22T19:35:00Z",
                 "ingress_bytes": 18,
                 "ingress_bytes_decompressed": 192,
                 "interval": "5min",
                 "local_ingress_lag_time": 0.0,
                 "pending_local_writes_max": 0.0,
                 "pending_local_writes_min": 0.0,
                 "stime": "2017-10-22T19:30:00Z"
             }
         ],
         "uid": "3"
     }
   ]
 }

Status codes

CodeDescription
200 OKNo error
404 Not FoundDatabase does not exist.
406 Not AcceptableDatabase is not a CRDB.

Get CRDB peer stats

GET /v1/bdbs/{bdb_uid}/peer_stats/{int: uid}

Get statistics for a specific CRDB peer instance.

Permissions

Permission nameRoles
view_bdb_statsadmin
cluster_member
cluster_viewer
db_member
db_viewer

Request

Example HTTP request

GET /bdbs/1/peer_stats/3?interval=5min

Headers

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

URL parameters

FieldTypeDescription
bdb_uidintegerThe unique ID of the local CRDB instance.
uidintegerThe peer instance uid, as specified in the CRDB instance list.

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 a specific CRDB peer instance.

Example JSON body

{
    "intervals": [
        {
            "egress_bytes": 0.0,
            "egress_bytes_decompressed": 0.0,
            "etime": "2017-10-22T19:30:00Z",
            "ingress_bytes": 18528,
            "ingress_bytes_decompressed": 185992,
            "interval": "5min",
            "local_ingress_lag_time": 0.244,
            "pending_local_writes_max": 0.0,
            "pending_local_writes_min": 0.0,
            "stime": "2017-10-22T19:25:00Z"
        },
        {
            "egress_bytes": 0.0,
            "egress_bytes_decompressed": 0.0,
            "etime": "2017-10-22T19:35:00Z",
            "ingress_bytes": 18,
            "ingress_bytes_decompressed": 192,
            "interval": "5min",
            "local_ingress_lag_time": 0.0,
            "pending_local_writes_max": 0.0,
            "pending_local_writes_min": 0.0,
            "stime": "2017-10-22T19:30:00Z"
        }
    ],
    "uid": "3"
}

Status codes

CodeDescription
200 OKNo error
404 Not FoundDatabase or peer does not exist.
406 Not AcceptableDatabase is not a CRDB.