-
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
Add file rotation based on file age to file output plugin #5547
Add file rotation based on file age to file output plugin #5547
Conversation
Err, there we go. Accidentally put in a older file_test.go and broke Write() a bit. This compiles for me, and appears to be working like it should. FYI: It's next to impossible to compile Telegraf with only 2GB ram :-( |
1c9954a
to
7b55480
Compare
Is there any way you can push these changes to the 3922 to preserve the history? Or is this a fundamentally different approach? |
@glinton uh, I could in theory do that I guess? This is basically The other pull-request #3922 adds a whole new plugin Isn't history preserved enough by having the first pull-request saying this one takes over? Edit: I'd say this is a fundamentally different approach. |
Does the thumbs up mean everything is good? :-) |
@flexd We added rotation based on this pull request to the agent logfile, I think we can update this pull request to use the rotating io.Writer now in https://github.com/influxdata/telegraf/tree/master/internal/rotate. I'd like to include this in the 1.11 release, would you have time to update the pull request? |
I will make the required changes :-) Very cool that my pull-request has lead to changes somewhere else! |
Uh, that should do it! I think I might have messed up the rebase there with all these commits showing up :-/ Any suggestions? |
I think you will need to do an interactive rebase |
76c196f
to
cc2fed0
Compare
That looks like it fixed it. :-) |
That last check was leftover from before the io.MultiWriter was used I think :-) Used to be a slice of writers |
Required for all PRs:
I have not touched the unit tests at all (yet)
This replaces #3922