#11663 proxies: adjust logrotate to xz logs
Closed: Fixed 4 months ago by kevin. Opened 5 months ago by kevin.

Currently, proxies are using the default fedora logrotate config for syslog files:

# cat /etc/logrotate.d/rsyslog 
/var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
{
    missingok
    sharedscripts
    postrotate
        /usr/bin/systemctl reload rsyslog.service >/dev/null 2>&1 || true
    endscript
}

I'd like to change that to use the same as we currently use for pagure:
./roles/pagure/files/syslog-logrotate

This will keep 7 days of logs, but xz compress them and rotate daily. We don't need more than that on there since they are moved to a central log host anyhow, and we want to save space on proxies because they are all space constrained.


I think that the log copying script may need patching if it looks for .gz files and they are no longer there, but that is the only other thing I can think of.

My understanding was that the log copying part only did httpd logs? I might be mistaken tho, so thats something to check for sure.

... it does ... geez I really have forgotten how things were set up.

Metadata Update from @phsmoura:
- Issue priority set to: Waiting on Assignee (was: Needs Review)
- Issue tagged with: low-gain, low-trouble, ops

5 months ago

Metadata Update from @aheath1992:
- Issue assigned to aheath1992

5 months ago

@kevin Are we good to close this issue?

There was one last thing which I sadly missed in looking at it.

We copied the new file in as rsyslog-logrotate (the name of the file in ansible). Unfortunately, that meant that logrotate had a 'rsyslog' (the stock one) and 'rsyslog-logrotate', so it errored out with duplicate files specificed. ;)

I just pushed a quick fix to overwrite the default one and we should be good now.

I think it might make sense to keep this open and check tomorrow that the proxies really did rotate as we like, and then close it. ;)

This seems to be working as expected now. Thanks!

Metadata Update from @kevin:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

4 months ago

Login to comment on this ticket.

Metadata
Boards 1
ops Status: Backlog