This topic describes the fields of PolarDB for MySQL logs. PolarDB for MySQL logs include audit logs, slow query logs, and performance logs.

Audit logs

Log field Description
__topic__ The topic of a log entry. Valid value: polardb_audit_log.
owner_id The ID of an Alibaba Cloud account.
region The region where a PolarDB for MySQL cluster resides.
cluster_id The ID of a PolarDB for MySQL cluster.
node_id The ID of a node in a PolarDB for MySQL cluster.
check_rows The number of scanned rows.
db The name of a database.
fail Indicates the result that is returned after an SQL statement is executed. Valid values:
  • 0: successful
  • 1: failed
client_ip The IP address of a client that accesses a PolarDB for MySQL cluster.
latency The latency of a result that is returned after an SQL statement is executed. Unit: microseconds.
origin_time The time when an SQL statement is executed.
return_rows The number of returned rows.
sql The SQL statement.
thread_id The ID of a thread.
user The name of a user who executes an SQL statement.
update_rows The number of updated rows.

Slow query logs

Log field Description
__topic__ The topic of a log entry. Valid value: rds_slow_log.
owner_id The ID of an Alibaba Cloud account.
region The region where a PolarDB for MySQL cluster resides.
cluster_id The ID of a PolarDB for MySQL cluster.
node_id The ID of a node in a PolarDB for MySQL cluster.
db_type The type of a PolarDB database.
db_name The name of a PolarDB database.
version The version number of a PolarDB database.
rows_examined The number of scanned rows.
rows_sent The number of returned rows.
start_time The time when an SQL statement is executed.
query_time The time that is consumed to execute an SQL statement. Unit: seconds.
lock_time The time that is consumed by a lock wait. Unit: seconds.
user_host The information of a client.
query_sql The SQL statement of a slow query.

Performance logs

Metric Description
mysql_perf_active_session The number of active connections per second.
mysql_perf_binlog_size The local binary log usage. Unit: MB.
mysql_perf_com_delete The average number of times that the DELETE statements are executed per second.
mysql_perf_com_delete_multi The average number of times that the Multi DELETE statements are executed per second.
mysql_perf_com_insert The average number of times that the INSERT statements are executed per second.
mysql_perf_com_insert_select The average number of times that the INSERT SELECT statements are executed per second.
mysql_perf_com_replace The average number of times that the REPLACE statements are executed per second.
mysql_perf_com_replace_select The average number of times that the REPLACE SELECT statements are executed per second.
mysql_perf_com_select The average number of times that the SELECT statements are executed per second.
mysql_perf_com_update The average number of times that the UPDATE statements are executed per second.
mysql_perf_com_update_multi The average number of times that the Multi UPDATE statements are executed per second.
mysql_perf_cpu_ratio The CPU utilization. Unit: percent.
mysql_perf_created_tmp_disk_tables The number of temporary tables that are automatically created per second.
mysql_perf_data_size The data usage. Unit: MB.
mysql_perf_innodb_buffer_dirty_ratio The dirty ratio of a buffer pool. Unit: percent.
mysql_perf_innodb_buffer_read_hit The read hit ratio of a buffer pool. Unit: percent.
mysql_perf_innodb_buffer_use_ratio The utilization of a buffer pool. Unit: percent.
mysql_perf_innodb_data_read The amount of data that is read from a storage engine per second. Unit: bytes.
mysql_perf_innodb_data_reads The average number of read operations that are performed on a buffer pool per second.
mysql_perf_innodb_data_writes The average number of write operations that are performed on the buffer pool per second.
mysql_perf_innodb_data_written The amount of data that is written to a storage engine per second. Unit: bytes.
mysql_perf_innodb_log_write_requests The average number of log write requests per second.
mysql_perf_innodb_os_log_fsyncs The average number of write operations to a log file by calling the fsync() function.
mysql_perf_innodb_rows_deleted The number of deleted rows per second.
mysql_perf_innodb_rows_inserted The number of inserted rows per second.
mysql_perf_innodb_rows_read The number of read rows per second.
mysql_perf_iops The IOPS.
mysql_perf_iops_r The read IOPS per second.
mysql_perf_iops_throughput The I/O throughput per second. Unit: MB.
mysql_perf_iops_throughput_r The read I/O throughput per second. Unit: MB.
mysql_perf_iops_throughput_w The write I/O throughput per second. Unit: MB.
mysql_perf_iops_w The write IOPS per second.
mysql_perf_kbytes_received The average inbound traffic per second. Unit: KB.
mysql_perf_kbytes_sent The average outbound traffic per second. Unit: KB.
mysql_perf_mem_ratio The memory utilization. Unit: percent.
mysql_perf_mps The number of data operations per second.
mysql_perf_other_log_size The usage of other logs. Unit: MB.
mysql_perf_qps The number of requests per second.
mysql_perf_redolog_size The usage of local redo logs. Unit: MB.
mysql_perf_slow_queries The number of slow queries per second.
mysql_perf_sys_dir_size The usage of the system space. Unit: MB.
mysql_perf_tmp_dir_size The usage of the temporary space. Unit: MB.
mysql_perf_total_session The average number of total connections.
mysql_perf_tps The average number of transactions per second.