[SOLVED] Log File Rotation

May 17, 2021
17
0
6
36
Is it possible to read log files that are rotated daily? We have an enormous amount of traffic that comes through daily and we can easily get 1 GB files in the log so we set up daily rotations with compression. I noticed that we are no longer able to look in the Tracking Center for previous days items. I can disable the compression for a day so that we can at least see the day before's log. Is it possible to read more than just mail.log in Tracking Center?
 
The Tracking center takes it's information from /var/log/syslog, /var/log/syslog.1, /var/log/syslog.(2-31).gz
you should be able to tune the logrotation for those files to get more information

currently the filenames are hardcoded - so you need to keep the delaycompress option in the logrotate.conf

I hope this helps!
 
  • Like
Reactions: aasami
The Tracking center takes it's information from /var/log/syslog, /var/log/syslog.1, /var/log/syslog.(2-31).gz
you should be able to tune the logrotation for those files to get more information

currently the filenames are hardcoded - so you need to keep the delaycompress option in the logrotate.conf

I hope this helps!
Oh ok. So they come from the syslog, not mail.log. I will go and change syslog from the date format that is currently has to the numbers. The Tracking Center is able to read into zipped files as well?
 
Oh ok. So they come from the syslog, not mail.log. I will go and change syslog from the date format that is currently has to the numbers. The Tracking Center is able to read into zipped files as well?
yes - but as said - it's not too flexible - the list of files it considers is hard-coded:
https://git.proxmox.com/?p=pmg-log-...24a352a5daa92406d5a17ae7bb65f9e56dfb04d#l2198

There's an enhancement request for augmenting that https://bugzilla.proxmox.com/show_bug.cgi?id=3657
(but as always no promises if/when this might be included)