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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rotate options for file sink #20492

Closed
dani opened this issue May 14, 2024 · 2 comments
Closed

Add rotate options for file sink #20492

dani opened this issue May 14, 2024 · 2 comments
Labels
type: feature A value-adding code addition that introduce new functionality.

Comments

@dani
Copy link

dani commented May 14, 2024

A note for the community

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Use Cases

When using the file sink, log files will grow indefinitely. We need to manage rotation with an external tool (like logrotate). It'd be conveniant to be able to handle rotation in vector (time based, size based, number of old logs to keep, compression)

Attempted Solutions

No response

Proposal

No response

References

No response

Version

No response

@dani dani added the type: feature A value-adding code addition that introduce new functionality. label May 14, 2024
@jszwedko
Copy link
Member

Hi @dani ! Thanks for opening this. We'd previously discussed similar functionality in #2057 and came to the conclusion that Vector should just defer to, and work well with, external tools like logrotate rather than building in log rotation capabilities to Vector itself. Given that, I'll close this issue out, but let me know if there are use-cases you can think of that Vector could handle that something logrotate couldn't or if you have other reasons you think Vector should have this functionality.

@dani
Copy link
Author

dani commented May 20, 2024

OK thanks. I tried to avoid logrotate (as it's often a pain to use. In my case, I can't even rely on it because of it's strange and hardcoded permission checks on log dir). Anyway, I worked around it with a naive copy + truncate + compress script based on size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A value-adding code addition that introduce new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants