[8.6](backport #34605) [winlog/winlogbeat] Gracefully handle event channel not found errors#34655
Merged
taylor-swanson merged 4 commits into8.6from Feb 23, 2023
Merged
[8.6](backport #34605) [winlog/winlogbeat] Gracefully handle event channel not found errors#34655taylor-swanson merged 4 commits into8.6from
taylor-swanson merged 4 commits into8.6from
Conversation
…34605) - Added logic to gracefully handle event channel not found errors. This will only apply to event subscriptions and not reading event files (evtx). If a channel not found error is encountered, either during intial open or during reading, the application will attempt to open a subscription to the event after a short delay. - Added Channel and IsFile methods to the EventLog interface. - Added IsChannelNotFound function - Improved logging through further use of structured logging fields. (cherry picked from commit 34a87e5) # Conflicts: # winlogbeat/eventlog/eventlog.go # winlogbeat/eventlog/wineventlog.go # winlogbeat/eventlog/wineventlog_experimental.go
|
This pull request doesn't have a |
Contributor
GLMONTER
reviewed
May 11, 2023
| case !api.IsFile() && eventlog.IsChannelNotFound(err): | ||
| e.log.Warnw("Open() encountered channel not found error. Trying again...", "error", err, "channel", api.Channel()) | ||
| time.Sleep(time.Second * 5) | ||
| continue |
There was a problem hiding this comment.
When running winlogbeat as a service under windows, the continue causes the service to never stop if requested to if a channel is not found. Is this expected behavior?
This file contains hidden or 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
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.
This is an automatic backport of pull request #34605 done by Mergify.
Cherry-pick of 34a87e5 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refreshwill re-evaluate the rules@Mergifyio rebasewill rebase this PR on its base branch@Mergifyio updatewill merge the base branch into this PR@Mergifyio backport <destination>will backport this PR on<destination>branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com