[rsyslog-notify] Forum Thread: imfile will skip last lines in rotated file - (Mode 'post')

noreply at adiscon.com noreply at adiscon.com
Thu Sep 3 08:40:10 CEST 2015


User: erikseres 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=25883#p25883

Message: 
----------
Hello,

I have imfile configured to monitor one specific file. That file gets
rotated daily. On rotation, imfile will successfully detect the newly
created file each day and will start processing it from the first line in
it. The problem I encounter, is that occasionally, imfile will not process
the last few lines in the old, rotated file.

Here is my logrotate config:

<path to file> {
  rotate 60
  daily
  missingok
  notifempty
  compress
  delaycompress
  nocreate
  postrotate
    <post rotate action to ask the application writing into the file to
reopen the file>
  endscript
}

And here is my rsyslog imfile config:

input(
  type="imfile"
  File="<path to file>"
  Tag="<tag>"
  Facility="user"
  Severity="notice"
  PersistStateInterval="1000"
  ReadMode="0"
  MaxSubmitAtOnce="1024"
  deleteStateOnFileDelete="on"
  Ruleset="<ruleset name>"
  addMetadata="off"
)

Please let me know if you have experienced the same issue and how you were
able to fix it.

Thank you,
Erik


More information about the rsyslog-notify mailing list