This topic describes the fields that are included in audit logs of PolarDB-X databases.
Field | Type | Description |
---|---|---|
__topic__ | string | The topic to which PolarDB-X logs belong. The value is polardbx_sqlaudit .
|
instance_id | string | The ID of the PolarDB-X instance. |
db_name | string | The name of the PolarDB-X database. |
client_ip | string | The IP address of the client that accesses the PolarDB-X instance. |
client_port | int | The port over which the client accesses the PolarDB-X instance. |
user | string | The username of the account that is used to perform the operation. |
sql | string | The SQL statement that is executed. |
response_time | int | The response time. Unit: ms. |
affect_rows | int |
|
trace_id | string | The trace ID that is generated for the SQL request. |
fail | int | This field indicates whether the SQL query fails. Valid values:
|
hint | string | The hint that is used in the SQL statement. |
table_name | string | The tables on which the SQL statement is executed. Multiple table names are separated with commas (,). |
sql_type | string | The type of the SQL statement. Valid values:
|
sql_type_detail | string | The name of the SQL parser. |
sql_time | datetime | The UTC time when the system starts to execute the SQL statement. The time is displayed
in the yyyy-MM-dd HH:mm:ss.SSS format.
|
sql_code | string | The hash value of the SQL template. |
transaction_id | string | The ID of the transaction. |
autocommit | int | This field indicates whether the autocommit mode is enabled when the SQL statement is executed. Valid values:
|
transaction_policy | string | The transaction policy based on which the SQL statement is executed. Valid values:
|
workload_type | string | The type of the processor that is used when the SQL statement is executed. Valid values:
|