Skip to content
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

File checkpointing #147

Closed
3 tasks done
binarylogic opened this issue Mar 20, 2019 · 1 comment
Closed
3 tasks done

File checkpointing #147

binarylogic opened this issue Mar 20, 2019 · 1 comment
Assignees
Labels
source: file Anything `file` source related type: enhancement A value-adding code change that enhances its existing functionality.

Comments

@binarylogic
Copy link
Contributor

binarylogic commented Mar 20, 2019

The ability to persist a file's current read position and resume where left off between restarts.

One approach, which is what Timber used in it's old agent, is to take the first 256 bytes of a file and produce a checksum / finger print as well as the position. The checksum is used to identify the file if it is renamed.

https://github.com/timberio/agent/blob/004e495f9e6b21c3ca2b9cd516e3e498ddec40dc/tailer.go#L144-L162

Open to alternative solutions. Requirements are:

  • Vector can be restarted and resumed, starting where it left off
  • Vector can be restarted and resumed, even if the file has been rotated / renamed. We can use the checksum to identify the file. This, of course, requires the user to configure a glob pattern that would fine the renamed file.
  • Vector can be restarted, the file can be truncated, and Vector will start reading from the beginning.
@binarylogic binarylogic added source: file Anything `file` source related type: enhancement A value-adding code change that enhances its existing functionality. labels Mar 20, 2019
@binarylogic
Copy link
Contributor Author

Just noting, this is not something we should do for the 0.1 release, just adding this issue for future reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source: file Anything `file` source related type: enhancement A value-adding code change that enhances its existing functionality.
Projects
None yet
Development

No branches or pull requests

2 participants