-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Windows Event Log Receiver doesn't collect some legacy events correctly #35135
Comments
Pinging code owners: See Adding Labels via Comments if you do not have permissions to add labels yourself. |
/label os:windows |
@dharley-atlastix as you said the receiver should actually fallback to the non-formatted event rendering when the event source is empty - at least the JSON that you attached and the event that I tested had an empty event source. If there is no source there isn't much to be "formatted" anyway. That said I couldn't repro the issue, as if the Anyway, this behavior can be changed on the collector to avoid the issue. For reference the JSON captured by the collector: {
"channel": "Application",
"computer": "<computer_name>",
"event_data": {
"binary": "00BB570053625100016C8D0000000000F20300004CCC0B000000000000000000",
"data": [
{
"": "<chkdsk /c output omitted for brevity>"
}
]
},
"opcode": "Info",
"provider": {
"event_source": "",
"guid": "",
"name": "Chkdsk"
},
"record_id": 3917664,
"system_time": "2024-09-16T20:45:49.4408698Z",
"task": "0"
} |
@pjanotti Your interesting results made me go back and take a look in to the issue a bit further. Testing on Windows 11 as per your method yielded no issues, likewise testing an RTM Server 2016 was the same. Interestingly I tried test rendering the message field using a EvtFormatMessageEvent parameter against the a modifed |
Thanks for looking back at all these combinations @dharley-atlastix - this is useful information! I appreciate that. Given that it happened in your deployment and we can workaround the issue in a transparent fashion, I'm going ahead with PR #35227. When that is released you shouldn't see the issue even on the 2022 RTM with no updates. |
…ider (open-telemetry#35227) **Description:** When the event doesn't have a Publisher we should not rely on the behavior of `EvtFormatMessage` API, given, that in some cases it reports error. Instead we should fallback to the non-formatted message to avoid logging error messages on the collector. See issue open-telemetry#35135. **Link to tracking Issue:** Fix open-telemetry#35135 **Testing:** Local validation of the processing of the events reported in the issue. **Documentation:** N/A --------- Co-authored-by: Daniel Jaglowski <[email protected]>
Component(s)
receiver/windowseventlog
What happened?
Description
When the Windows Event Log Receiver encounters an older style event, it is unable to correctly ingest the event details as the vendor xml template is seemingly missing. This "appears" to be because the source of the event uses some other legacy templating system (DLL) to create the event, and the receiver is setup to expect that a Vendor XML Template will always exist. Assuming the XML lookup is used because it is more efficient than directly rendering, it maybe best to implement a fallback strategy to ensure all data is captured using an alternative rendering API.
Steps to Reproduce
Setup a windows event log receiver and capture the events generated by the following built in Windows commands:
diskpart
chkdsk /c
This has also been observed from events generated by the
DHCPServer
service andVSS
, however recreating these conditions is more complicated.Expected Result
No error should be logged about a missing template as the event is structured correctly in the Windows Event Log viewer.
All fields should be populated the same as the Event Log viewer and per other events extracted via the receiver.
Actual Result
The following error is logged:
Fields such as the
Message
,Keywords
,Opcode
contain missing or unexpected data.The
Provider
used to contain incomplete data in 0.107 and below, but the recent change to rendering the name usingsystem
properties appears to have addressed this.#34914
Collector version
v0.109.0
Environment information
Environment
OS: ("Windows 2022")
Compiler(n/a)
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: