New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imfile: truncated file won't be read until size growed to the previous length #511
Comments
Found the related changes that discarded truncation detection in commit cdc27ae, possible to add it back with a flag to enable this feature? For example in my case duplicate content is fine but message loss is unacceptable. |
ymattw
added a commit
to ymattw/rsyslog
that referenced
this issue
Sep 7, 2015
ymattw
added a commit
to ymattw/rsyslog
that referenced
this issue
Sep 7, 2015
ymattw
added a commit
to ymattw/rsyslog
that referenced
this issue
Nov 24, 2015
Works for us but upstream wants an opt-in flag
ymattw
added a commit
to ymattw/rsyslog
that referenced
this issue
Dec 3, 2015
Attempt to fix rsyslog#511. This is an enhanced version based on rsyslog#514, works fine for us so far. As discussed before, I added an opt-in flag 'reopenOnTruncate' and default is "off".
ymattw
added a commit
to ymattw/rsyslog
that referenced
this issue
Dec 3, 2015
Attempt to fix rsyslog#511. This is an enhanced version based on rsyslog#514, works fine for us so far. As discussed before, I added an opt-in flag 'reopenOnTruncate' and default is "off".
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When input file in truncated, log appended to the file won't be read until its size reached the previous length. This can be easily reproduced with following sample config:
Desired behavior is to reset the recorded offset when input file is truncated.
I am attaching the full debug log below, broken into sections with some comments, hope this helps.
Startup
Write 10 lines with
head /etc/services >> /tmp/input.log
Truncate file with
> /tmp/input.log
Write one line with
echo HELLO >> /tmp/input.log
, rsyslog does not read the line, neither writes output.logThe text was updated successfully, but these errors were encountered: