功能介绍:查询top n条慢日志
GET https://[endpoint].ctapi.ctyun.cn/v1/logMgr/describeTopSlowLogRecords
Content-Type:multipart/form-data
URI参数说明:
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
prodInstId | 873780530431132672 | String | 是 | 实例ID |
redisSetName | redisSet_873780530431132672 | String | 是 | 集群名,取值:describeClusterMemberInfo |
nodeName | redisSet_873780530431132672_25260 | String | 是 | redis节点名,来源:getRedisNodeList |
size | 10 | String | 否 | 查询前N条,默认128条 |
返回参数说明:
参数名 | 示例值 | 参数类型 | 参数描述 |
---|---|---|---|
code | core.ok | String | 响应码描述 |
returnObj | Object | 响应对象 | |
returnObj.total | 10 | int | 数量 |
returnObj.rows | Object | 白名单列表 | |
returnObj.rows.id | 1717 | String | 日志ID |
returnObj.rows.beginTime | 1661261546 | String | 开始时间 |
returnObj.rows.cost | 12 | String | 消耗时间ms |
returnObj.rows.command | [detect,3] | String | 命令、参数 |
message | success | String | 响应信息 |
statusCode | 800 | int | 响应状态码 |
请求示例:
GET https://dcs2-global.ctapi.ctyun.cn/v1/logMgr/describeTopSlowLogRecords?prodInstId=873780530431132672&redisSetName=redisSet_873780530431132672&nodeName=redisSet_873780530431132672_25260&size=10
返回示例:
{
"code": "core.ok",
"returnObj": {
"total": 2,
"rows": [ {
"id": "1717",
"beginTime": "1661261546",
"cost": "12",
"command": "[detect, 3]"
},
{
"id": "1716",
"beginTime": "1661261546",
"cost": "1",
"command": "[newsave]"
} ]
},
"message": "success",
"statusCode": 800
}