mirror of
https://github.com/bokysan/docker-postfix.git
synced 2025-09-19 12:54:44 +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
1 changed files with 1 additions and 0 deletions
|
@ -52,6 +52,7 @@ metrics:
|
|||
enabled: true
|
||||
logrotate.conf: |
|
||||
/var/log/mail.log {
|
||||
copytruncate
|
||||
rotate 1
|
||||
monthly
|
||||
minsize 1M
|
||||
|
|
Loading…
Add table
Reference in a new issue