集群统计信息请求
集群统计请求
Redis 企业软件 |
---|
方法 | 路径 | 描述 |
---|---|---|
获取 | /v1/cluster/stats |
获取集群统计信息 |
获取集群统计信息
GET /v1/cluster/stats
Get cluster statistics.
Permissions
Permission name
Roles
view_cluster_stats
admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager
Request
Example HTTP request
GET /v1/cluster/stats/1?interval=1hour&stime=2014-08-28T10:00:00Z
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 statistics for the cluster.
Example JSON body
{
"intervals": [
{
"interval": "1hour",
"stime": "2015-05-27T12:00:00Z",
"etime": "2015-05-28T12:59:59Z",
"conns": 0.0,
"cpu_idle": 0.8533959401503577,
"cpu_system": 0.01602159448549579,
"cpu_user": 0.08721123782294203,
"egress_bytes": 1111.2184745131947,
"ephemeral_storage_avail": 3406676307.1449075,
"ephemeral_storage_free": 4455091440.360014,
"free_memory": 2745470765.673594,
"ingress_bytes": 220.84083194769272,
"interval": "1week",
"persistent_storage_avail": 3406676307.1533995,
"persistent_storage_free": 4455091440.088265,
"total_req": 0.0
},
{
"interval": "1hour",
"stime": "2015-05-27T13:00:00Z",
"etime": "2015-05-28T13:59:59Z",
"// additional fields..."
}
]
}
Example requests
cURL
$ curl -k -u "[username]:[password]" -X GET
https://[host][:port]/v1/cluster/stats?interval=1hour
Python
import requests
url = "https://[host][:port]/v1/cluster/stats?interval=1hour"
auth = ("[username]", "[password]")
response = requests.request("GET", url, auth=auth)
print(response.text)
Status codes
Code
Description
200 OK
No error
500 Internal Server Error
Internal server error
On this page