-
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] Add handling for missing event data types in the experimental API #40684
Conversation
a422a11
to
98cd5d2
Compare
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
Pinging @elastic/sec-windows-platform (Team:Security-Windows Platform) |
var ansiDecoder *encoding.Decoder | ||
|
||
func init() { | ||
ansiCP := windows.GetACP() |
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.
Not 100% about this one. Not sure if would be better to just add a config option that defaults either to ACP or Windows1250 and that can be user defined. I am not super confident the active page will always be the one we want.
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.
or rather option to use specific ANSI code page or let us discover it if not set
However I think the GetACP
will return the ANSI code page we want, because if people are using non-English variants of OS the winlog messages are also non-English
|
Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
We're reverting because Elastic Agent CI has been failing and we've narrowed it down to the type assertion failing here and not checking `ok` right after: https://github.com/elastic/beats/blob/138e43cad7eda93c1414641682056b6c88efcf1d/winlogbeat/sys/strings_windows.go#L31-L32 Specifically, when integration tests for Elastic Agent run on its CI Windows hosts, we are seeing this failure in the log: ``` panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x0 pc=0x284f4bf] goroutine 1 [running]: golang.org/x/text/encoding/charmap.(*Charmap).ID(0x0) /go/pkg/mod/golang.org/x/text@v0.18.0/encoding/charmap/charmap.go:111 +0x1f github.com/elastic/beats/v7/winlogbeat/sys.init.0() /go/src/github.com/elastic/beats/winlogbeat/sys/strings_windows.go:32 +0x10c ```
We're reverting because Elastic Agent CI has been failing and we've narrowed it down to the type assertion failing here and not checking `ok` right after: https://github.com/elastic/beats/blob/138e43cad7eda93c1414641682056b6c88efcf1d/winlogbeat/sys/strings_windows.go#L31-L32 Specifically, when integration tests for Elastic Agent run on its CI Windows hosts, we are seeing this failure in the log: ``` panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x0 pc=0x284f4bf] goroutine 1 [running]: golang.org/x/text/encoding/charmap.(*Charmap).ID(0x0) /go/pkg/mod/golang.org/x/text@v0.18.0/encoding/charmap/charmap.go:111 +0x1f github.com/elastic/beats/v7/winlogbeat/sys.init.0() /go/src/github.com/elastic/beats/winlogbeat/sys/strings_windows.go:32 +0x10c ```
We're reverting because Elastic Agent CI has been failing and we've narrowed it down to the type assertion failing here and not checking `ok` right after: https://github.com/elastic/beats/blob/138e43cad7eda93c1414641682056b6c88efcf1d/winlogbeat/sys/strings_windows.go#L31-L32 Specifically, when integration tests for Elastic Agent run on its CI Windows hosts, we are seeing this failure in the log: ``` panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x0 pc=0x284f4bf] goroutine 1 [running]: golang.org/x/text/encoding/charmap.(*Charmap).ID(0x0) /go/pkg/mod/golang.org/x/text@v0.18.0/encoding/charmap/charmap.go:111 +0x1f github.com/elastic/beats/v7/winlogbeat/sys.init.0() /go/src/github.com/elastic/beats/winlogbeat/sys/strings_windows.go:32 +0x10c ``` (cherry picked from commit 307e95c)
We're reverting because Elastic Agent CI has been failing and we've narrowed it down to the type assertion failing here and not checking `ok` right after: https://github.com/elastic/beats/blob/138e43cad7eda93c1414641682056b6c88efcf1d/winlogbeat/sys/strings_windows.go#L31-L32 Specifically, when integration tests for Elastic Agent run on its CI Windows hosts, we are seeing this failure in the log: ``` panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x0 pc=0x284f4bf] goroutine 1 [running]: golang.org/x/text/encoding/charmap.(*Charmap).ID(0x0) /go/pkg/mod/golang.org/x/text@v0.18.0/encoding/charmap/charmap.go:111 +0x1f github.com/elastic/beats/v7/winlogbeat/sys.init.0() /go/src/github.com/elastic/beats/winlogbeat/sys/strings_windows.go:32 +0x10c ``` (cherry picked from commit 307e95c) Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
Proposed commit message
Adds handling for missing event data types in the experimental API
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
Related issues