Age/time based rotation of logs
Open Discussion
As a System Administrator, I would like to have the option to configure in the WHM Manager age/time based rotation of logs on my server (due to GDPR compliance).
Reference: ticket 9621533
I'd like this as well for the same reason, my ideal solution would be something like:
- rotation interval (daily, weekly, monthly, possibly yearly as well?)
- rotation period (amount of days, weeks, months, years)
I think it could be built into the post-processing of cpanellogd, so cpanellogd would keep an index of when a file was last rotated, if the time is greater than your interval, then do the processing.
We could implement the above using a normal log rotation config, however there's cases where we then would miss out some statistics being processed by cpanellogd process - thus I believe it would be something to go into post-processing of the stats.
Currently logs are stored in /var/log/apache2/domlogs - maybe the "archive" structure could be something like:
/var/log/apache2/domlogs/archive/$user/$logfile
This will keep /var/log/apache2/domlogs kinda clean with only the current logs and move out the archived logs to a separate folder (which in fact we could store on a separate mount if we'd store tons of logs).
This feature request would also allow fixing a bug with the existing rotation of logs as well, since it does currently not work depending on which settings you put.
I'd like this as well for the same reason, my ideal solution would be something like:
- rotation interval (daily, weekly, monthly, possibly yearly as well?)
- rotation period (amount of days, weeks, months, years)
I think it could be built into the post-processing of cpanellogd, so cpanellogd would keep an index of when a file was last rotated, if the time is greater than your interval, then do the processing.
We could implement the above using a normal log rotation config, however there's cases where we then would miss out some statistics being processed by cpanellogd process - thus I believe it would be something to go into post-processing of the stats.
Currently logs are stored in /var/log/apache2/domlogs - maybe the "archive" structure could be something like:
/var/log/apache2/domlogs/archive/$user/$logfile
This will keep /var/log/apache2/domlogs kinda clean with only the current logs and move out the archived logs to a separate folder (which in fact we could store on a separate mount if we'd store tons of logs).
This feature request would also allow fixing a bug with the existing rotation of logs as well, since it does currently not work depending on which settings you put.
If keeping logs for a long defined period (365 days for example) it would be nice if they were kept in a compressed format. For us, one day in uncompressed format and 364 days in a compressed format would be fine. Ideally you would want to be able to specify for how many days logs should be kept uncompressed and how many days logs are kept in a compressed format.
If keeping logs for a long defined period (365 days for example) it would be nice if they were kept in a compressed format. For us, one day in uncompressed format and 364 days in a compressed format would be fine. Ideally you would want to be able to specify for how many days logs should be kept uncompressed and how many days logs are kept in a compressed format.
Would it be possible to have some cPanel staffer input on this suggestion please?
Would it be possible to have some cPanel staffer input on this suggestion please?
Replies have been locked on this page!