-
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
Log rotation on Windows #6183
Comments
As a test, does it work with a much smaller interval such as "5m"? |
Changing the setting to "5m" made no difference by itself. However, changing the setting to "5m" AND changing debug to 'debug = true' (so something would be written) did result in log file rotation. Is it possible that it is only checking the log file timestamp/size when it writes something to it? In our environment the only time I see things written to the log is during a service restart, or when we drop connection to the metrics/graphite system. The latter was my primary concern, and why I started looking at rotation. Log example when service is restarted: 2019-07-30T18:03:36Z I! [agent] Hang on, flushing any cached metrics before shutdown Log example when we drop connection to our metrics server: 2019-07-01T18:48:28Z E! Graphite: Reconnecting and retrying: |
Yes, no writes means no rotation. I think this is okay behavior though a bit confusing. |
Yes, it makes sense when rotation is based on size, but not so much when based on time. At a minimum, having something in the comments may be helpful. I'm more on the operations side, so not really sure what the "right" answer is here... |
That's a good point about size vs time, I've added a note to the time based rotation option that will hopefully reduce future confusion. 28f1bdb |
Still an issue #6888 (comment) |
Relevant telegraf.conf:
System info:
telegraf-1.11.1_windows_amd64
Windows Server 2016 Standard
Steps to reproduce:
Expected behavior:
Log file rotation after 1 day, or 24 hours.
Actual behavior:
No log file rotation occurs.
Additional info:
Seems to have possibly been addressed here:
#3393
I've also tried the argument as, logfile_rotation_interval = "24h", as well as trying to rotate based on size, logfile_rotation_max_size = "1KB", neither seem to work.
The text was updated successfully, but these errors were encountered: