-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
winlogbeat/eventlog: ensure event loggers restart metric collection when handling recoverable errors #36482
Conversation
…hen handling recoverable errors When winlogbeat's event loggers encounter recoverable errors they handle this by closing and reopening the channel. This causes the metric collection for the beat and dependent winlog filebeat input to lose metric collection as metric registration only occurs on configuration. So move metric registration to the channel open method. To avoid reregistration of metrics, use the nilness of the metric field to guard against this.
4ec6e57
to
17320f3
Compare
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
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.
This will make it better in that we will have metrics after a recovery. One concern I have is that we lose the cumulative metric state for the input after any major error. If you rely on the metrics alone (without looking at logged errors) then I think you would miss that there had been some issue (albeit recovered).
The alternative that I considered was to add a |
Counter proposal is here. |
This pull request is now in conflicts. Could you fix it? 🙏
|
Proposed commit message
When winlogbeat's event loggers encounter recoverable errors they handle this by closing and reopening the channel. This causes the metric collection for the beat and dependent winlog filebeat input to lose metric collection as metric registration only occurs on configuration. So move metric registration to the channel open method. To avoid reregistration of metrics, use the nilness of the metric field to guard against this.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs