Project

General

Profile

Feature #27024

Audits cleanup

Added by Kavita Gaikwad over 2 years ago. Updated 3 months ago.

Status:
Closed
Priority:
High
Category:
Audit Log
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1703496

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.

  1. 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

  1. 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:


Related issues

Related to Foreman - Feature #22158: Add a rake task for audits cleanupClosed2018-01-04
Related to Packaging - Feature #33623: Add cron to audits cleanupClosed

Associated revisions

Revision 40818327 (diff)
Added by Dominik Matoulek 3 months ago

Fixes #27024 - Adding audit cleanup duration and update rake task

Adding setting 'audit_period' to know how long saved audits user wants.
Also updating rake task for cleanup to reflect this setting

History

#1 Updated by Lukas Zapletal over 2 years ago

#2 Updated by Marek Hulán over 2 years ago

The rake task is there, we should make it automatically executed, similar to how we clean up reports https://github.com/theforeman/foreman-packaging/blob/rpm/develop/packages/foreman/foreman/foreman.cron.d

#3 Updated by Ondřej Ezr 10 months ago

  • Subject changed from Satellite audits cleanup to Audits cleanup

#4 Updated by Ondřej Ezr 10 months ago

I do not agree we should run the cleanup automatically. Audits should stay forever unless user say otherwise.
Unless we name this Activity log.

#5 Updated by Dominik Matoulek 4 months ago

#6 Updated by Dominik Matoulek 4 months ago

  • Assignee set to Dominik Matoulek

#7 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8844 added

#8 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases 3.1.0 added

#9 Updated by Dominik Matoulek 3 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF