-
Notifications
You must be signed in to change notification settings - Fork 1.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
in_winevtlog: Display error on invalid subscription state #8544
Merged
edsiper
merged 2 commits into
master
from
cosmo0920-winevtlog-display-error-when-subscription-is-invalid
Mar 14, 2024
Merged
in_winevtlog: Display error on invalid subscription state #8544
edsiper
merged 2 commits into
master
from
cosmo0920-winevtlog-display-error-when-subscription-is-invalid
Mar 14, 2024
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
Signed-off-by: Hiroshi Hatake <[email protected]>
cosmo0920
changed the title
in_winevtlog: Display error on invalid subscription state
in_winevtlog: Try to recreate subscription if signal event returns failed status
Mar 2, 2024
cosmo0920
force-pushed
the
cosmo0920-winevtlog-display-error-when-subscription-is-invalid
branch
from
March 2, 2024 07:45
d2cb767
to
7a60df0
Compare
cosmo0920
requested review from
edsiper,
leonardo-albertovich,
fujimotos and
koleini
as code owners
March 5, 2024 03:23
cosmo0920
force-pushed
the
cosmo0920-winevtlog-display-error-when-subscription-is-invalid
branch
from
March 5, 2024 03:26
7a60df0
to
0bd350d
Compare
…alid status Signed-off-by: Hiroshi Hatake <[email protected]>
cosmo0920
force-pushed
the
cosmo0920-winevtlog-display-error-when-subscription-is-invalid
branch
from
March 6, 2024 02:58
0bd350d
to
fbaedef
Compare
I resync implementation on this PR what winevt_c's PR does. I tested to try to make invalid status but the event signal does not respond for stale of EvtSubscribe. Checking WAIT_FAILED brunch is just for needed for the possibility to be returned from WaitForSingleObject Windows API. |
cosmo0920
changed the title
in_winevtlog: Try to recreate subscription if signal event returns failed status
in_winevtlog: Display error on invalid subscription state
Mar 6, 2024
edsiper
deleted the
cosmo0920-winevtlog-display-error-when-subscription-is-invalid
branch
March 14, 2024 21:44
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.
Fluent Bit is also using pull subscription model for collecting Windows EventLog. Through a registered signal, we're able to obtain the internal state of EvtSubscribe API.
Like as fluent-plugins-nursery/winevt_c#44 fix, Fluent Bit can be made to detect the failure of the subscription.
We need to check it for more strict approach to handle subscription for EventLog.
When failed status is returned from a registered signal, we should recreate the subscription if possible.
This signal approach is inspired from the article: https://learn.microsoft.com/en-us/windows/win32/wes/subscribing-to-events#pull-subscriptions
This article describes that when using the pull type of subscription, EvtSubscribe can tell whether Windows EventLogs are collected or not via a registered signal.
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.