Created
December 15, 2020 19:23
-
-
Save goyuninfo/1ac441f40e0cea3fdc02a6774223ef62 to your computer and use it in GitHub Desktop.
MySQL Audit Filtering Example: Only Log Successfully Executed INSERT Statements For some Specific Database/Tables Combinations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"filter": | |
{ | |
"id": "main", | |
"class": | |
{ | |
"name": "table_access", | |
"event": | |
{ | |
"name": [ "insert" ], | |
"log": false, | |
"filter": | |
{ | |
"activate": { "or": [ { "and": [ { "field": { "name": "table_database.str", "value": "db_1" } }, | |
{ "field": { "name": "table_name.str", "value": "table_1" } } ] }, | |
{ "and": [ { "field": { "name": "table_database.str", "value": "db_2" } }, | |
{ "field": { "name": "table_name.str", "value": "table_2" } } ] }, | |
{ "and": [ { "field": { "name": "table_database.str", "value": "db_3" } }, | |
{ "field": { "name": "table_name.str", "value": "table_3" } } ] } | |
] | |
}, | |
"class": { "name": "general", | |
"event": | |
{ | |
"name": "status", | |
"log": { "field": { "name": "general_error_code", "value": 0 } }, | |
"filter": { "ref": "main" } | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment