Helllo, I am configuring the audit_log
plugin and it is logging too many events and there seems to be no way to exclude them.
I have configured the plugin with audit_log_exclude_commands
to not log any common commands, so that only “unusual” activity is logged. The problem is that the log file is swamped by lines like
{"audit_record":{"name":"Connect","record":"3268525_2022-09-15T13:51:06","timestamp":"2022-09-15T14:36:54Z","connection_id":"10","status":0,"user":"xxx","priv_user":"xxx","os_login":"","proxy_user":"","host":"","ip":"10.0.0.1","db":"mydb"}}
{"audit_record":{"name":"Close stmt","record":"3268526_2022-09-15T13:51:06","timestamp":"2022-09-15T14:36:54Z","command_class":"close stmt","connection_id":"11","status":0,"sqltext":"","user":"xxx[xxx] @ [10.0.0.1]","host":"","os_user":"","ip":"10.0.0.1","db":"mydb"}}
{"audit_record":{"name":"Quit","record":"3268532_2022-09-15T13:51:06","timestamp":"2022-09-15T14:36:54Z","connection_id":"12","status":0,"user":"xxx","priv_user":"xxx","os_login":"","proxy_user":"","host":"","ip":"10.0.0.1","db":"mydb"}}
The second line above contains a "command_class":"close stmt"
(this is JSON output), but I have tried adding “close stmt”, “Close stmt”, “close” and a few other things to audit_log_exclude_commands
but cannot suppress the output.
Similarly, the configuration options appear to offer no way of excluding different event types (namely, “Connect” and “Quit”). Given that this server has several thousand connections per second, the amount of logs written to the file is not viable.
Does anyone have an idea how to do this?