-
Notifications
You must be signed in to change notification settings - Fork 177
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 close and clean harvesting #70
Changes from 5 commits
dca54f0
2858b47
3e11de6
8cb4237
5ea868d
e3e3f4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,33 +121,39 @@ filebeat: | |
# Close inactive closes the file handler after the predefined period. | ||
# The period starts when the last line of the file was, not the file ModTime. | ||
# Time strings like 2h (2 hours), 5m (5 minutes) can be used. | ||
#close_inactive: 5m | ||
<%- if @close_inactive -%> | ||
close_inactive: <%= @close_inactive %> | ||
<%- end -%> | ||
|
||
# Close renamed closes a file handler when the file is renamed or rotated. | ||
# Note: Potential data loss. Make sure to read and understand the docs for this option. | ||
#close_renamed: false | ||
close_renamed: <%= @close_renamed %> | ||
|
||
# When enabling this option, a file handler is closed immediately in case a file can't be found | ||
# any more. In case the file shows up again later, harvesting will continue at the last known position | ||
# after scan_frequency. | ||
#close_removed: true | ||
close_removed: <%= @close_removed %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If |
||
|
||
# Closes the file handler as soon as the harvesters reaches the end of the file. | ||
# By default this option is disabled. | ||
# Note: Potential data loss. Make sure to read and understand the docs for this option. | ||
#close_eof: false | ||
close_eof: <%= @close_eof %> | ||
|
||
### State options | ||
|
||
# Files for the modification data is older then clean_inactive the state from the registry is removed | ||
# By default this is disabled. | ||
#clean_inactive: 0 | ||
<%- if @clean_inactive -%> | ||
clean_inactive: <%= @clean_inactive %> | ||
<%- end -%> | ||
|
||
# Removes the state for file which cannot be found on disk anymore immediately | ||
#clean_removed: true | ||
clean_removed: <%= @clean_removed %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The logic for setting this will work the same way that |
||
|
||
# Close timeout closes the harvester after the predefined time. | ||
# This is independent if the harvester did finish reading the file or not. | ||
# By default this option is disabled. | ||
# Note: Potential data loss. Make sure to read and understand the docs for this option. | ||
#close_timeout: 0 | ||
<%- if @close_timeout -%> | ||
close_timeout: <%= @close_timeout %> | ||
<%- end -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how much commentary to add about configuration issues - there are a number of conflicting configuration parameters that can be set (e.g.
ignore_older
has to be greater thanclose_inactive
).Checking and warning for every conflict would be difficult to maintain, so I'm inclined to leave them out entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. Let's skip these kind of conflicts