大网数据广告活动
服务器运维问答

Audit logs for RDS MySQL not appearing in CloudWatch

· 52CE 我爱测

I've been trying to get a MySQL instance on Amazon's RDS to send logs to CloudWatch: in particular, both error logs and audit logs. Error logs work fine, they're appearing in CloudWatch, no issues at all. For audit logs, I know I…

问题原文

原帖链接 · pat · CC BY-SA 4.0

I've been trying to get a MySQL instance on Amazon's RDS to send logs to CloudWatch: in particular, both error logs and audit logs.

Error logs work fine, they're appearing in CloudWatch, no issues at all. For audit logs, I know I need to have the MariaDB Audit Plugin enabled - so, I've added it to an option group, and added that option group to the MySQL instance. I've also restarted the instance (which is apparently not needed, but I figure it was worth trying). I've also connected to the MySQL database a few times since enabling this about 24 hours ago.

Here are the settings I've attached to the MARIADB_AUDIT_PLUGIN option (I've only customised the events, everything else are the default values):

But: there is no log group, and there is also no mention of the audit file in the list of log files for the RDS instance. Any thoughts on what else I can try to debug this?

Also, when I connect to the database and check on the known plugins via SELECT plugin_name from information_schema.plugins, the MariaDB Audit Plugin is not listed. Should it be?

已采纳解答

原帖链接 · pat · CC BY-SA 4.0

It turns out two of the settings are required (and don't fall back to the documented defaults): SERVER_AUDIT_FILE_ROTATIONS and SERVER_AUDIT_FILE_ROTATE_SIZE. Once these are explicitly set in my options group, I've found that the log file appears in the RDS instance's console page, and they flow through to CloudWatch as well.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-08-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。