Hi, by law I have to keep maillogs for 2 years. Can I set a retention time in proxmox? It would be ideal if lookup in the tracking center would go that far back
Not really, for such a use case you need to implement a powerful log server where you can store this huge amount of logs.
So, for my own comfort, I'd like a retention of at least a month in the message center. If I change the logrotation, it will be visible in tracking center?
...
Exactly. Increase rotate count at /etc/logrotate.d/rsyslog on /var/log/syslog {}yes, if you syslogs are availabe for 30 days, you can also query them via the message tracking (check Debian howto for changing the log rotation)
Sorry for the noob question, but how can I increase the limit?The tracking center is a front-end to the syslog and the syslog files are available for 7 days, just standard Debian Linux.
If you want to store gigabytes of logs from every day for 2 years, you need a huge server. You will find a lot of tools exactly for this task.
Sorry for the noob question, but how can I increase the limit?
I would like to keep at least one month.
Do I have to restart sth later?As posted above: Increase rotate count at /etc/logrotate.d/rsyslog on /var/log/syslog
However, ensure that longer logging comply as well with GDPR
Do I have to restart sth later?
And if I will update my PMG, do I have to change again that setting? Can I do sth like a custom file?
ps: Damn, I hate GDPR :/
However, ensure that longer logging comply as well with GDPR
GDPR doesn't say nothing about logging. But could be a law specifically in your country, and in this case you must be follow.
So you can‘t read anything directly but the data protection supervisory bodies like to reduce the log files storage, if containing personal data and it does: sender, recipient, ...
/var/log/syslog
/var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
/var/log/mail.log
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/lpr.log
/var/log/cron.log
/var/log/debug
/var/log/messages
{
rotate 8
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
/usr/lib/rsyslog/rsyslog-rotate
endscript
}
To keep logs for 1 month, 3 months, 6 months, and 1 year, you can change the "rotate" value to the number of logs you want to keep. For example, if you want to keep logs for 1 month, you can set the "rotate" value to 4 (4 weeks in a month), and for 1 year, you can set it to 52 (52 weeks in a year).Can someone give some guidance what are the correct settings if we want to keep logs for 1 month, 3 months, 6 months, 1 year? We have the storage space how much log can we realistically store on proxmox mail gateway before it breaks?
Looking at /etc/logrotate.d/rsyslog I am guessing we have to increase this value rotate 8??
What are the best values to keep the tracking center search speed as fast as possible? Should we rotate daily, monthly instead?
/etc/logrotate.d/rsyslog
Code:/var/log/syslog /var/log/mail.info /var/log/mail.warn /var/log/mail.err /var/log/mail.log /var/log/daemon.log /var/log/kern.log /var/log/auth.log /var/log/user.log /var/log/lpr.log /var/log/cron.log /var/log/debug /var/log/messages { rotate 8 weekly missingok notifempty compress delaycompress sharedscripts postrotate /usr/lib/rsyslog/rsyslog-rotate endscript }
To keep logs for 1 month, 3 months, 6 months, and 1 year, you can change the "rotate" value to the number of logs you want to keep. For example, if you want to keep logs for 1 month, you can set the "rotate" value to 4 (4 weeks in a month), and for 1 year, you can set it to 52 (52 weeks in a year).
It's difficult to say how much log you can store on the proxmox mail gateway without it breaking, as it depends on several factors such as the size of the logs, the available storage space, and the performance of the server. It's best to monitor the storage usage and adjust the log retention accordingly.
As for the best values to keep the tracking center search speed as fast as possible, it's generally recommended to rotate the logs daily or weekly. This helps to keep the log files small, which can improve the search speed. However, it's also important to consider the log retention requirements and adjust the rotation frequency accordingly.
In the /etc/logrotate.d/rsyslog configuration file, you can adjust the "rotate" value and the "weekly" frequency to meet your log retention and performance requirements. It's also recommended to keep the other settings such as "missingok", "notifempty", and "compress" to ensure the logs are rotated and compressed properly.