Description of problem: Satellite audits cleanup Version-Release number of selected component (if applicable): Satellite 6.4.2 How reproducible: Always Steps to Reproduce: 1.Some production Satellites have more than 5 million audit entries which degrades the performance of Satellite audit UI. Need an automatic cleanup mechanism to remove old audit entries. Actual results: Production Satellites accumulate large of Audit data which are not purged. # time curl -k -u admin https://satellite.example.com/api/audits > audit Enter host password for user 'admin': % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 13950 0 13950 0 0 817 0 --:--:-- 0:00:17 --:--:-- 3534 real 0m19.485s user 0m0.047s sys 0m0.066s # head audit { "total": 5136427, "subtotal": 5136427, "page": 1, "per_page": 30, "search": null, "sort": { "by": null, "order": null }, Expected results: Need an automated purge mechanism for audits. Additional info:
This should have customization so the user can pick and choose the settings that are desired.
Use foreman rake task to cleanup audits. To keep the last 2 years worth of data and delete anything older than that: foreman-rake audits:expire days=730
Created redmine issue https://projects.theforeman.org/issues/27024 from this bug
This should not be considered an enhancement but a bug. The tasks needed should be automated by-default.
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team. Thank you.
At very least, this cleanup step should be clearly explained in the upgrade documentation. This was a real-world scenario and that had a measurable impact on productivity.
Thanks for the comment, it has been re-evaluated and should be addressed.
Upstream bug assigned to dmatoule
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/27024 has been resolved.
Version-Release number of selected component (if applicable): Satellite 6.12.0 - 10 Steps to Reproduce: 1. Create some audit log entries by doing various actions on a Satellite 2. Go to Administer -> Settings and change the value of "Saved Audits Interval" to something other than blank Expected Results: After the specified time period, the audits get cleared. Actual results: After the specified time period, the audits get cleared.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:8506