mirror of
https://github.com/bokysan/docker-postfix.git
synced 2024-09-20 06:46:10 +08:00
Fix #158: Add copytruncate
to logrotate.conf
.
From lograte man pages: > `copytruncate`: Truncate the original log file to zero size in place after creating a copy, instead of moving the old log file and optionally creating a new one. Why? Because file might be followed by file descriptior (and not name). So when logrorate rotates the file, Prometheus will follow the old file (thus receiving no metrics). By using `comytruncate` we ensure that the followed file is always the proper one.
This commit is contained in:
parent
4b4524940e
commit
72988ddf47
|
@ -52,6 +52,7 @@ metrics:
|
|||
enabled: true
|
||||
logrotate.conf: |
|
||||
/var/log/mail.log {
|
||||
copytruncate
|
||||
rotate 1
|
||||
monthly
|
||||
minsize 1M
|
||||
|
|
Loading…
Reference in a new issue