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
Adding wildcards for folders in the localfile configuration on Windows #15973
Merged
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
6 tasks
MarcelKemp
added
type/enhancement
New feature or request
module/logcollector
platform/windows
module/configuration
team/core/security warriors
labels
Jan 20, 2023
MarcelKemp
changed the title
Monitoring logs using wildcard for folders on Windows issue #12351
Adding wildcards for folders in the localfile configuration on Windows
Jan 20, 2023
MarcelKemp
requested changes
Jan 20, 2023
lsayanes
force-pushed
the
12351_wildcard_logcollector
branch
2 times, most recently
from
February 14, 2023 17:39
b59f081
to
06ee983
Compare
MarcelKemp
requested changes
Feb 16, 2023
MarcelKemp
previously approved these changes
Feb 17, 2023
lsayanes
force-pushed
the
12351_wildcard_logcollector
branch
2 times, most recently
from
March 20, 2023 15:49
d4abd2d
to
4e8f69c
Compare
28 tasks
lsayanes
force-pushed
the
12351_wildcard_logcollector
branch
from
April 28, 2023 14:24
4e8f69c
to
0ca4013
Compare
MarcelKemp
approved these changes
May 15, 2023
MarcelKemp
force-pushed
the
12351_wildcard_logcollector
branch
from
June 1, 2023 13:35
0ca4013
to
84907de
Compare
jnasselle
requested changes
Jul 25, 2023
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.
Wildcard windows issue fixed Scan-build ok Style C asked, applied Correction Jenkins error compiler fixed The function expand_win32_wildcards into check_pattern_expand
lsayanes
force-pushed
the
12351_wildcard_logcollector
branch
from
July 25, 2023 21:47
84907de
to
db44930
Compare
jnasselle
approved these changes
Jul 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
Wildcard log monitoring for folders and files in Windows has been added to this branch.
Wildcards '*' and '?' are allowed in folders and files in Windows:
Meaning: '*' as a complete word and '?' as a character
Sources:
The following files have been modified:
Log deleted:
In the
Read_Localfile
function (in localfile-config.c) the call to the Win32 FindFirstFile function has been removed because it is not able to resolve wildcard paths, for this reason the following error message has also been removed:GLOB_ERROR_WIN "(1141): Glob error. Invalid pattern: '%s' or no files found."
Proof of concept:
In this proof of concept for Windows Agent, three types of monitoring are established:
The ossec.conf has been configured for:
Given this folder structure:
The following log (extract) was obtained with windows.debug=2
Tests