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

Audit logs

Field Description
__topic__ The topic of the log. The value is fixed as polardb_audit_log.
owner_id The ID of the Alibaba Cloud account to which the PolarDB for MySQL cluster belongs.
region The ID of the region where the PolarDB for MySQL cluster resides.
cluster_id The ID of the PolarDB for MySQL cluster.
node_id The ID of the node in the PolarDB for MySQL cluster.
check_rows The number of scanned rows.
db The name of the database.
fail Indicates whether the SQL statement is successfully executed. Valid values:
  • 0: successful
  • 1: failed
client_ip The IP address of the client that accesses the PolarDB for MySQL cluster.
latency The time that is consumed to return the result of the SQL statement. Unit: microseconds.
origin_time The point in time at which the SQL statement is executed.
return_rows The number of returned rows.
sql The SQL statement that is executed.
thread_id The ID of the thread.
user The name of the user who executes the SQL statement.
update_rows The number of updated rows.

Slow query logs

Field Description
__topic__ The topic of the log. The value is fixed as polardb_slow_log.
owner_id The ID of the Alibaba Cloud account to which the PolarDB for MySQL cluster belongs.
region The ID of the region where the PolarDB for MySQL cluster resides.
cluster_id The ID of the PolarDB for MySQL cluster.
node_id The ID of the node in the PolarDB for MySQL cluster.
db_type The type of the databases that are created in the PolarDB for MySQL cluster.
db_name The name of the PolarDB for MySQL database.
version The version of the database engine.
rows_examined The number of scanned rows.
rows_sent The number of returned rows.
start_time The point in time at which the SQL statement is executed.
query_time The time that is consumed to execute the SQL statement. Unit: seconds.
lock_time The duration of the lock wait. Unit: seconds.
user_host The information about the client.
query_sql The SQL statement of the slow query.

Error logs

Field Description
__topic__ The topic of the log. The value is fixed as polardb_error_log.
collect_time The time at which the log is collected.
content The content of the log.
type_role The type of the PolarDB for MySQL cluster.
event_type The type of the event.
instance_id The ID of the PolarDB for MySQL cluster.
region The ID of the region where the PolarDB for MySQL cluster resides.
db_version The version of the database engine.

Performance logs

Metric Description
mysql_perf_active_session The number of active connections per second.
mysql_perf_binlog_size The amount of binary logs that are generated on your computer. Unit: MB.
mysql_perf_com_delete The average number of times that DELETE statements are executed per second.
mysql_perf_com_delete_multi The average number of times that MULTI-DELETE statements are executed per second.
mysql_perf_com_insert The average number of times that INSERT statements are executed per second.
mysql_perf_com_insert_select The average number of times that INSERT-SELECT statements are executed per second.
mysql_perf_com_replace The average number of times that REPLACE statements are executed per second.
mysql_perf_com_replace_select The average number of times that REPLACE-SELECT statements are executed per second.
mysql_perf_com_select The average number of times that SELECT statements are executed per second.
mysql_perf_com_update The average number of times that UPDATE statements are executed per second.
mysql_perf_com_update_multi The average number of times that 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 amount of storage space that is occupied by data. Unit: MB.
mysql_perf_innodb_buffer_dirty_ratio The ratio of dirty pages to the total number of pages in the buffer pool. Unit: percent.
mysql_perf_innodb_buffer_read_hit The read hit ratio of the buffer pool. Unit: percent.
mysql_perf_innodb_buffer_use_ratio The utilization of the buffer pool. Unit: percent.
mysql_perf_innodb_data_read The amount of data that is read from the storage engine per second. Unit: bytes.
mysql_perf_innodb_data_reads The average number of read operations that are performed on the 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 the 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 the 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 input/output operations per second (IOPS).
mysql_perf_iops_r The read IOPS.
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.
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 usage. Unit: percent.
mysql_perf_mps The number of operations that are performed on data per second.
mysql_perf_other_log_size The amount of other logs that are generated. Unit: MB.
mysql_perf_qps The queries per second (QPS).
mysql_perf_redolog_size The amount of redo logs that are generated on your computer. Unit: MB.
mysql_perf_slow_queries The number of slow queries per second.
mysql_perf_sys_dir_size The amount of storage space that is occupied by system files. Unit: MB.
mysql_perf_tmp_dir_size The amount of storage space that is occupied by temporary files. Unit: MB.
mysql_perf_total_session The average number of total connections.
mysql_perf_tps The average number of transactions per second.