Queries the operational logs of a Tair (Redis OSS-compatible) instance.
Operation description
To view operational logs in the Tair (Redis OSS-compatible) console, see View active logs.
This operation can be called up to 100 times per minute.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
kvstore:DescribeRunningLogRecords |
get |
*DBInstance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the instance. |
r-bp1zxszhcgatnx**** |
| NodeId |
string |
No |
The ID of a node in the instance. Specify this parameter to query operational logs for a specific node. Note
|
r-bp1zxszhcgatnx****-db-0 |
| StartTime |
string |
Yes |
The beginning of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. |
2018-12-03T07:01Z |
| EndTime |
string |
Yes |
The end of the time range to query. Must be later than the start time. The time range cannot exceed one day, and a range of 1 hour is recommended. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. |
2018-12-03T08:01Z |
| DBName |
string |
No |
The name of the database. |
0 |
| RoleType |
string |
No |
The role of the data shard. Default value: master. Valid values:
|
master |
| PageSize |
integer |
No |
The number of entries to return on each page. Valid values: 30, 50, and 100. Default value: 30. |
30 |
| PageNumber |
integer |
No |
The page number to return. Must be a positive integer within the integer data type range. Default value: 1. |
1 |
| ResourceGroupId |
string |
No |
The ID of the resource group. |
rg-acfmyiu4ekp**** |
| CharacterType |
string |
No |
The shard type of the cluster instance. Valid values:
Note
If you set this parameter, you must also set the NodeId parameter. |
proxy |
| QueryKeyword |
string |
No |
The keyword for filtering operational logs. |
aof |
| OrderType |
string |
No |
The sort order of returned log entries. Valid values:
|
asc |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| StartTime |
string |
The beginning of the time range to query. |
2018-12-03T07:01Z |
| RequestId |
string |
The ID of the request. |
093B8579-9264-43A0-ABA9-AA86**** |
| PageRecordCount |
integer |
The number of log entries returned on the current page. |
5 |
| TotalRecordCount |
integer |
The total number of entries returned. |
5 |
| PageSize |
integer |
The maximum number of entries returned on each page. |
30 |
| InstanceId |
string |
The ID of the instance. |
r-bp1zxszhcgatnx**** |
| Engine |
string |
The type of the database engine. |
Redis |
| PageNumber |
integer |
The page number of the returned page. |
1 |
| Items |
object |
||
| LogRecords |
array<object> |
Details about the log entries. |
|
|
object |
|||
| CreateTime |
string |
The time when the log entry was generated, in yyyy-MM-ddTHH:mm:ssZ format (UTC). |
2018-12-03T07:07:30Z |
| InstanceId |
string |
The ID of the instance. |
r-bp1zxszhcgatnx**** |
| Content |
string |
The content of the log. |
CONFIG REWRITE executed with success. |
| NodeId |
string |
The ID of the node. Note
If a standard instance is queried, |
r-bp1zxszhcgatnx****-db-0 |
Examples
Success response
JSON format
{
"StartTime": "2018-12-03T07:01Z",
"RequestId": "093B8579-9264-43A0-ABA9-AA86****",
"PageRecordCount": 5,
"TotalRecordCount": 5,
"PageSize": 30,
"InstanceId": "r-bp1zxszhcgatnx****",
"Engine": "Redis",
"PageNumber": 1,
"Items": {
"LogRecords": [
{
"CreateTime": "2018-12-03T07:07:30Z",
"InstanceId": "r-bp1zxszhcgatnx****",
"Content": "CONFIG REWRITE executed with success.",
"NodeId": "r-bp1zxszhcgatnx****-db-0"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidStartTime.Malformed | The Specified parameter StartTime is not valid. | |
| 400 | InvalidEndTime.Malformed | The Specified parameter EndTime is not valid. | |
| 400 | InvalidPageSize.Malformed | The specified parameter PageSize is not valid. | |
| 404 | InvalidDbInstanceId.NotFound | Specified instance does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.