Technical Note: Scheduled audit log purge functionality does not purge the audit logs
You can schedule purging, on a global level, for audit logs by clicking the Settings icon and opening the "System Configuration" page. On this page, in the Purge Logs section you can define the schedule for purging the Audit Logs.
Once you have setup purging the audit log should get purged as per the schedule you have setup. However, sometimes the scheduled audit log purge functionality does not work and the audit logs do not get purged.
Solution
To resolve this issue, do the following:
- Open the "AuditLog Cleanup" playbook located at: Settings > System Configuration > System Fixtures > Schedule Management Playbooks and click the AuditLog Cleanup playbook to open it in the playbook designer
- Click the Delete AuditLogs step to open this step and replace the text of its Body field with the following content:
{"uptoDate": {{arrow.utcnow().timestamp*1000 - vars.ttl_config.ttl*24*60*60*1000}} }
and then click Save. - Click Save Playbook to save the changes to the playbook.
Now, the scheduled audit log purge functionality should work and the audit logs should get purged.
