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

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.x

Issue

Resolution

  • The reports older than 30 days, stored in reports table inside foreman database, can be cleaned up using the following command:

    # foreman-rake reports:expire sleep_time=0.2 batch_size=1000 days=30 --trace
    
  • If it's required to delete a specific type of report e.g. all ARF reports, then the following command can be used:

    # foreman-rake reports:expire days=0 sleep_time=0.2 report_type="ForemanOpenscap::ArfReport" --trace
    

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.