forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[receiver/windowseventlog] Add Execution and Security information to …
…parsed event log (open-telemetry#27864) **Description:** Adds parsing for Execution and Security sections of the event log, as defined in the schema here: https://learn.microsoft.com/en-us/windows/win32/wes/eventschema-systempropertiestype-complextype **Link to tracking Issue:** open-telemetry#27810 **Testing:** * Added some unit tests * Tested on a windows machine to make sure it parsed correctly on a real system --------- Co-authored-by: Paulo Janotti <[email protected]>
- Loading branch information
Showing
4 changed files
with
309 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: enhancement | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) | ||
component: windowseventlogreceiver | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Add parsing for Security and Execution event fields. | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [27810] | ||
|
||
# If your change doesn't affect end users or the exported elements of any package, | ||
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. | ||
# Optional: The change log or logs in which this entry should be included. | ||
# e.g. '[user]' or '[user, api]' | ||
# Include 'user' if the change is relevant to end users. | ||
# Include 'api' if there is a change to a library API. | ||
# Default: '[user]' | ||
change_logs: ["user"] |
28 changes: 28 additions & 0 deletions
28
pkg/stanza/operator/input/windows/testdata/xmlSampleUserData.xml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> | ||
<System> | ||
<Provider Name="Microsoft-Windows-Eventlog" Guid="{fc65ddd8-d6ef-4962-83d5-6e5cfe9ce148}" /> | ||
<EventID>1102</EventID> | ||
<Version>1</Version> | ||
<Level>4</Level> | ||
<Task>104</Task> | ||
<Opcode>0</Opcode> | ||
<Keywords>0x4020000000000000</Keywords> | ||
<TimeCreated SystemTime="2023-10-12T10:38:24.543506200Z" /> | ||
<EventRecordID>2590526</EventRecordID> | ||
<Correlation /> | ||
<Execution ProcessID="1472" ThreadID="7784" /> | ||
<Channel>Security</Channel> | ||
<Computer>test.example.com</Computer> | ||
<Security UserID="S-1-5-18" /> | ||
</System> | ||
<UserData> | ||
<LogFileCleared xmlns="http://manifests.microsoft.com/win/2004/08/windows/eventlog"> | ||
<SubjectUserSid>S-1-5-21-1148437859-4135665037-1195073887-1000</SubjectUserSid> | ||
<SubjectUserName>test_user</SubjectUserName> | ||
<SubjectDomainName>TEST</SubjectDomainName> | ||
<SubjectLogonId>0xa8bb72</SubjectLogonId> | ||
<ClientProcessId>4536</ClientProcessId> | ||
<ClientProcessStartKey>17732923532772643</ClientProcessStartKey> | ||
</LogFileCleared> | ||
</UserData> | ||
</Event> |
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
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