Assuming:
- you don't have easy access to underlying system (such as Gateway in container and don't want to re-image)
- optionally have all innodb tables on a per file basis (innodb_file_per_table=1)
- you have a JDBC connection to local ssg database
Create on first node of API Gateway cluster:
1) a Web Service on "/common/ClearAudit" with:
line 16: Date assigment:
Line 17: 1st query:
Line 22: 2nd query:
Line 25: 3rd query:
Add some security before, whitelisting IP address, basic creds, etc. so that this API is not called from unauthorized people.
2) a policy-backed service "Audit Scheduled Clear Old Entries" (background task) with:
3) Schedule task
run on one-node, 1st member of cluster, let's say one per day at 3:15am