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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completely ignore files older then 'ignore_older' setting #324

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Gleb-Gadyatskiy
Copy link

RE: Elastic support case #01555020

Completely ignore files older then 'ignore_older' setting because we have hundreds of thousands of files in the same folder (logs from a 3d party app) but need to monitor/ingest only recent

@@ -36,6 +36,13 @@ def discover
private

def can_exclude?(watched_file, new_discovery)
if watched_file.file_ignorable?
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If file should be ignored - we should not include it in list of watched files at all

@@ -140,7 +152,7 @@ def process_restat_for_watched_and_active(watched_files)
def process_rotation_in_progress(watched_files)
logger.trace(__method__.to_s)
watched_files.each do |watched_file|
next unless watched_file.rotation_in_progress?
next unless !watched_file.ignored? && watched_file.rotation_in_progress?
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignored files should not be monitored at all

Copy link
Author

@Gleb-Gadyatskiy Gleb-Gadyatskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review proposed fix for Elastic Support Case #01555020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants