-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Feature Request] Auto splitting for file output plugin #1550
Comments
I just started/finished writing one of these that rotates the file based on file age. It could easily be modified to support size as well. If I have time I will publish it soon. |
Any update on this? |
As a workaround, you could use logrotate or another log rotation service to implement this. You can use the telegraf logrotate file as an example. |
I never got around to using what I wrote, and I'm not sure where I put it, unfortunately. It should be in a git repo somewhere 😄 |
I can't find it now, must be on a old machine somewhere, it was never pushed to GitHub. I started with the normal file plugin https://github.com/influxdata/telegraf/tree/master/plugins/outputs/file and just added closing the current file and opening a new one every X minutes if data was sent. You can rotate a file by using a custom writer, something like suggested here https://stackoverflow.com/a/28797984 |
closing due to inactivity |
For output.file plugin, cut (rename, logrotate) the file after reaching a certain size.
The text was updated successfully, but these errors were encountered: