Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-8344

Allow TailFile to continue tailing a file for some time after it has been rolled over

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.14.0
    • Extensions
    • None

    Description

      TailFile makes the assumption that once a file has been rolled over, it will never be appended to. If the file's Last Modified timestamp changes, the processor assumes that it's a new file and imports the entire contents of the file again.

      However, one practice that I've encountered is that users have a syslog server that rotates periodically. To rotate, they rename the existing file, and then restart the server. When that happens, the server will flush out any data that it has buffered to the file that was just rolled over, and then begin writing to the new file.

      This results in the TailFile processor ingesting the entire file that has been rolled over. Because we can't keep state about every file that is rolled over, we should introduce a property that allows the user to indicate that upon rollover they want to continue tailing that rolled over file until it is no longer being written to, and then begin tailing the new file.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            markap14 Mark Payne
            markap14 Mark Payne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 1.5h
              1.5h

              Slack

                Issue deployment