Redis provides audit logs, slow logs, and run logs. This topic describes the fields for each log type.
Audit log
The audit log is stored in a Logstore named redis_audit_log_standard. The following table describes the fields.
Field | Description |
__topic__ | The log topic.
|
account | The name of the database account. |
command | The executed Redis command. If |
db | The name of the database. |
extend_information | Additional information. |
instanceid | The Redis instance ID. |
ip | The IP address. |
is_cautious | Indicates whether the operation is high-risk.
|
latency | The command execution latency.
|
time | The timestamp. Example: 1597048424. |
type | The type of log. Valid values:
|
When type is 7 (hot key log), the following table describes the fields of each element in the command array.
Field | Type | Description |
category | string | The method used to identify a hot key.
|
dbid | long | The database where the key is located. Example: |
key | string | The specific key. Example: |
type | string | The data type of the key. Example: |
lfu | long | This field can be ignored. It was used in earlier engine versions and is returned only for hot keys identified based on QPS. |
qps | number|string | The access frequency. Examples: Note: The data type of this field is number in newer engine versions but string in some earlier versions. |
in_bytes | long | The ingress traffic. This field is returned only when |
out_bytes | long | The egress traffic. This field is returned only when |
When type is 8 (large key log), the following table describes the fields of each element in the command array.
Field | Type | Description |
dbid | text | The database where the key is located. Example: |
key | text | The specific key. Example: |
type | text | The data type of the key. Example: Note: In open-source Redis and some earlier Tair versions, a string key is logged as a large key if its length exceeds the threshold (default: 2000). |
size | long | The number of elements. Example: 1024. |
Slow log
The slow log is stored in a Logstore named redis_slow_run_log. The following table describes the fields.
Field | Description |
__topic__ | The log topic.
|
account | The name of the database account. |
command | The executed Redis command. |
db | The name of the database. |
extend_information | Additional information. |
instanceid | The Redis instance ID. |
ip | The IP address. |
is_cautious | Indicates whether the operation is high-risk.
|
latency | The command execution latency.
|
time | The timestamp. Example: 1597048424. |
type | The type of log. |
Run log
The run log is stored in a Logstore named redis_slow_run_log. The following table describes the fields.
Field | Description |
__topic__ | The log topic. The value is always |
extend_information | Additional information. |
instanceid | The Redis instance ID. |
node_type | The source node of the run log.
|
runlog | The run log content. |
time | The timestamp. Example: 1597048424. |