uaa.log in Operations Manager 2.7.30 and 2.10.8 is full and is not getting rotated
search cancel

uaa.log in Operations Manager 2.7.30 and 2.10.8 is full and is not getting rotated

book

Article ID: 293804

calendar_today

Updated On:

Products

Operations Manager

Issue/Introduction

uaa.log.*.backup is getting full and is not getting rotated in Operations Manager 2.7.30 and 2.10.8.

In large deployments, these .backup files can become quite large, as seen in the log snippet below:
root@ip-44-130-73-142:/home/tempest-web/uaa/tomcat/logs# du -hs * | sort -rh | head
1.5G    uaa.log.1-2021030800.backup
1.5G    uaa.log.1-2021030700.backup
1.5G    uaa.log.1-2021030600.backup
1.5G    uaa.log.1-2021030500.backup
1.5G    uaa.log.1-2021030400.backup
1.5G    uaa.log.1-2021030300.backup
1.5G    uaa.log.1-2021030200.backup
1.5G    uaa.log.1-2021030100.backup
1.5G    uaa.log.1-2021022800.backup
1.5G    uaa.log.1-2021022700.backup


Environment

Product Version: 2.10

Resolution

To work around this issue, we can create two cron jobs that will run at 00:00 every Sunday and automatically delete the "uaa.logs.*.backup" files that are older than 7 days.

1.  SSH into your Ops Manager.

2.  Run crontab -e. This will open up the cron table in vi. Here we can add our jobs.

3.  Enter the following line of code into the table.

Note: Make sure not to delete existing jobs.
0 0 * * 0 find /home/tempest-web/uaa/tomcat/logs -name "uaa.log.*.backup" -type f -mtime +7 -exec rm -f {} \;

4.  Once the code has been added in without any syntax errors, save and exit the text editor.

Change the "-mtime +7" parameter to a different value if you would like to keep your logs for a longer or a shorter period of time. You can also change the "0 0 * * 0" value in order to run the job at a different time or at different intervals.

The following is a useful website for changing cron schedules:
 
This issue has effected Ops Manager 2.10.8 and 2.7.30. The fix is available in Ops Manager 2.10.9.