-
Notifications
You must be signed in to change notification settings - Fork 1
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
Allow specifying log files in file_reader using glob patterns #44
Open
souryogurt
wants to merge
11
commits into
vxcontrol:master
Choose a base branch
from
cyberok-org:feature-file_reader-track-files-matching-patterns
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Allow specifying log files in file_reader using glob patterns #44
souryogurt
wants to merge
11
commits into
vxcontrol:master
from
cyberok-org:feature-file_reader-track-files-matching-patterns
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
souryogurt
force-pushed
the
feature-file_reader-track-files-matching-patterns
branch
from
January 19, 2023 17:23
a34e721
to
d3519d2
Compare
Users of file_reader module want to track log files of applications with enabled rotation. In this case, they do not know the exact name of the files to be tracked, and they would like to specify them using glob patterns. Log files can now be specified using glob patterns. But only files existing during module configuration will be tracked.
The function wasn't attaching directory path to the names of files.
This module tracks files specified using wildcard patterns already. It finds such files during configuration. Nevertheless, to track new files created after the module's configuration, the module must constantly monitor directories and keep looking for files added. For this, the DirectoryWatcher has been created.
The directory watcher approach was too error-prone in the agent's environment. It didn't call the function of stopping watchers, which caused crashes sometimes. Rather than monitoring directory changes reactively, the module scans the directory proactively every second now.
The module periodically scans directories for files matching wildcard patterns specified by the user. The interval between scans is customizable with the "period" parameter.
UI let's you select a file to start reading from the beginning. Unfortunately, the list got broken after wildcards were added. Instead of using the configuration list, the browser part now gets the current watched list directly from the agent during initialization.
souryogurt
force-pushed
the
feature-file_reader-track-files-matching-patterns
branch
from
January 19, 2023 17:34
d3519d2
to
e8212d5
Compare
NexoMichael
reviewed
Jan 30, 2023
It is better to check the operating system directly from the tests themselves and disable them rather than having large "if" blocks that selects tests to run.
The file_reader was crashing in case the savepoint file used to store the latest position in tracked files was empty.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
Users of file_reader module want to track log files of applications with enabled rotation. In this case, they do not know the exact name of the files to be tracked, and they would like to specify them using glob patterns.
Log files can now be specified using glob patterns.
Closes #8
Changelog Entry
Added ability to specify log files in file_reader using glob patterns.
Checklist: