You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems clear that logrotate's strategy when rolling a log file is to copy the current log to a new file, zero out the current log file and then resume logging on that same file. This strategy is incompatible with tools like Filebeat which are collecting log files. Filebeat tracks the log files it processes through inode. When you roll a log file by copying it to a new file, Filebeat will see all those log records as new. Meanwhile, the current file being zeroed out and restarted would cause Filebeat to miss log records for as long as the file is smaller than Filebeat's last known offset of that file.
Is there a way to change pm2-logrotate's strategy, in exactly the same way you can change this very thing in Unix's logrotate?
The text was updated successfully, but these errors were encountered:
It seems clear that logrotate's strategy when rolling a log file is to copy the current log to a new file, zero out the current log file and then resume logging on that same file. This strategy is incompatible with tools like Filebeat which are collecting log files. Filebeat tracks the log files it processes through inode. When you roll a log file by copying it to a new file, Filebeat will see all those log records as new. Meanwhile, the current file being zeroed out and restarted would cause Filebeat to miss log records for as long as the file is smaller than Filebeat's last known offset of that file.
Is there a way to change pm2-logrotate's strategy, in exactly the same way you can change this very thing in Unix's logrotate?
The text was updated successfully, but these errors were encountered: