How to clean up old audit information from the audits table inside the foreman database on Red Hat Satellite 6?

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.x

Issue

Resolution

The old audit information from the audits table inside the foreman database can be cleaned up using either of the following commands based on the user's choice:

  • To cleanup/expire all audits older than 90 days:

    # foreman-rake audits:expire --trace --verbose
    
  • To cleanup/expire all audits older than 30 days:

    # foreman-rake audits:expire days=30 --trace --verbose
    

For more KB articles/solutions related to Red Hat Satellite 6.x PostgreSQL-related Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x PostgreSQL-related Issues

SBR
Product(s)

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.