This topic describes the fields in logs that are collected from ApsaraDB RDS instances.

Audit logs

FieldDescription
__topic__The topic of the log. The value is fixed as rds_audit_log.
instance_idThe ID of the ApsaraDB RDS instance.
check_rowsThe number of scanned rows.
dbThe name of the database.
failIndicates whether the SQL statement is successfully executed.
  • If the instance is a MySQL instance or an SQL Server instance and the SQL statement is successfully executed, the value of this field is 0. All values other than 0 indicate a failure.
  • If the instance is a PostgreSQL instance and the SQL statement is successfully executed, the value of this field is 0000. All values other than 0000 indicate a failure.
client_ipThe IP address of the client that accesses the ApsaraDB RDS instance.
latencyThe time that is consumed to return the result of the SQL statement. Unit: microseconds.
origin_timeThe point in time at which the SQL statement is executed.
return_rowsThe number of returned rows.
sqlThe SQL statement that is executed.
thread_idThe ID of the thread.
userThe name of the user who executes the SQL statement.
update_rowsThe number of updated rows.

Slow logs

FieldDescription
__topic__The topic of the log.
  • The topic of a slow log in ApsaraDB RDS for MySQL is rds_slow_log.
  • The topic of a slow log in ApsaraDB RDS for PostgreSQL is rds_slow_log_pg.
db_nameThe name of the database.
db_typeThe database type of the ApsaraDB RDS instance. Valid values: MySQL and PostgrepSQL.
db_versionThe database engine version of the ApsaraDB RDS instance.
instance_idThe ID of the cluster.
lock_timeThe duration of the lock wait. Unit: seconds.
owner_idThe ID of the Alibaba Cloud account.
query_sqlThe SQL statement of the slow query.
query_timeThe time that is consumed to execute the SQL statement. Unit: seconds.
regionThe region where the ApsaraDB RDS instance resides.
rows_examinedThe number of scanned rows.
rows_sentThe number of returned rows.
start_timeThe point in time at which the SQL statement is executed.
user_hostThe information about the client.

Error logs

FieldDescription
__topic__The topic of the log.
  • The topic of an error log in ApsaraDB RDS for MySQL is rds_error_log.
  • The topic of an error log in ApsaraDB RDS for PostgreSQL is rds_error_log_pg.
instance_idThe ID of the cluster.
collect_timeThe time at which the log is collected.
db_typeThe database type of the ApsaraDB RDS instance. Valid values: MySQL and PostgrepSQL.
db_versionThe database engine version of the ApsaraDB RDS instance.
contentThe content of the log.
eventTypeThe type of the event.