Hello everbody,
we are currently migrating from 8.0 to 8.4 and therefore need to switch from the legacy Audit Log Plugin to modern Audit Log Filter Component.
And although the component is much better and can do more, I can’t manage to implement a possible simple thing.
I want to log certain queries for a list of users. In the old plugin it was quite easy to do this:
audit_log_include_commands = select
audit_log_include_accounts = 'sebastian@localhost'
this has created the desired entries:
"Query","<...>","<...>","<...>","<...>",0,"select ...","sebastian[sebastian] @ [10.20.108.132]","","","10.20.108.132",""
I’m unable to do that in the new component. What I have tried up so far:
- filter on class “table_access”. This works, but does not log the exact statements.
{
“timestamp”: “2025-07-29 13:07:45”,
“id”: 50934,
“class”: “table_access”,
“event”: “update”,
“connection_id”: 2815,
“table_access_data”: {
“db”: “MYDB”,
“table”: “MYTABLE”}
} - filter on class “query”. This will log the statements, but does not log the user information (I could only derive this from previous connection/general records).
{
“timestamp”: “2025-07-29 13:06:02”,
“id”: 11241,
“class”: “query”,
“event”: “query_start”,
“connection_id”: 1887,
“query_data”: {
“query”: “SELECT 1’”,
“status”: 0,
“sql_command”: “select”}
}
Both classes also do not respect the filter "user": "sebastian"
as documented, actions of all users are still being written to log.
Is it possible in the new plugin to output filtered queries together with the user in one record?
To me, this sounds like a simple and often needed requirement that has to work. That’s why I feel pretty stupid right now and would be glad if someone could help me
have a good day
Sebastian