chocolatey / chocolatey-licensed-issues

Issues for Licensed Editions of Chocolatey
19 stars 13 forks source link

Audit log retention does not clean up old log entries #336

Closed sync-by-unito[bot] closed 9 months ago

sync-by-unito[bot] commented 1 year ago

Issue Explanation

Currently CCM Audit Log Retention is not running when configured within CCM settings.

Reason for Issue

We are seeing some customers that are running SQLExpress as their DB backend for CCM hitting the 10GB DB size limit on their CentralManagement DB. This causes the website to eventually refuse login with an internal error as it cannot log the login attempt.

Reproduction Steps

  1. Have a CCM enviornment with at least 2 days of logged audit data. You can go under Administration > Audit Logs and search by date range to see if you have this data.
  2. Set your audit retention setting to enabled and 1 day. Then run the restart process referenced in the following setting documentation.
  3. Give the machine 5 minutes to attempt to run the retention query for deletion.
  4. Log back into CCM and check if you can see the audit logs from later than today/yesterday.
  5. Look at the CentralManagement DB using SSMS. Query the data in the dbo.AbpAuditLogs table to confirm if older log entries still exist.

Ticket references

┆Issue is synchronized with this Gitlab issue by Unito

gep13 commented 9 months ago

The functionality requested here is now available in Chocolatey Central Management 0.11.0.