Windows Event Logs are a detailed record of notifications stored by the Windows operating system. These logs are used for troubleshooting and monitoring the health and security of a system. Dynatrace OneAgent is using native Windows API to gather all log records. There are three main logs:
Windows Event Logs are automatically detected and can be ingested using the Dynatrace OneAgent. You can provide custom Event Logs by the Custom log source configuration.
There are multiple ways to configure your Windows event logs. To enable and customize their ingestion, follow the steps below.
Before you start the actual configuration, set the value for the Windows Event Log query timeout:
Go to
Settings > Collect and capture > Log monitoring > Configure log module > Advanced settings.
In the Windows Event Log query timeout field, input a value, in seconds, to define the maximum timeout value for the query extracting the Windows Event Logs.
The following configuration allows Windows event logs to be ingested and ready for analysis. Follow the steps below:
Go to
Settings > Collect and capture > Log monitoring > Configure log module > Ingest rules.
Enable the [Built-in] Windows system, application, and security logs rule.
If the [Built-in] Ingest all logs option is enabled, Windows event logs are automatically included, and no additional configuration is required to enable their ingestion.
The steps below are required in case you want to customize log ingest rules when you need to collect only specific Windows event logs based on their attributes, rather than ingesting all available logs.
Go to
Settings > Collect and capture > Log monitoring > Configure log module > Ingest rules.
Select New rule and enter a Rule name.
Under Matchers, from Attribute, select one or more of the Windows log attributes.
In Values, enter the matcher value according to the chosen attribute.
Select Create.
The steps below are required in case you want to customize log ingest rules when you need to collect only specific Windows event logs based on their names, rather than ingesting all available logs.
Go to
Settings > Collect and capture > Log monitoring > Configure log module > Ingest rules.
Select New rule and enter a Rule name.
Under Matchers, from Attribute, select Log source.
In Values, enter one or more Windows log matchers (Windows Application Log, Windows Security Log, or Windows System Log).
Select Create.
Custom Windows event log sources are useful when you need to ingest logs from custom application logs or logs created by third-party software. For example, if your organization has a custom application, you can use this feature to collect and analyze its own dedicated event logs in Dynatrace.
To ingest custom Windows event logs, you can define a custom log source. Follow the steps below to configure and add a custom Windows event log source according to your requirements.
Go to
Settings > Collect and capture > Log monitoring > Configure log module > Sources.
In the Add missing log sources section, select New log source rule and enter a Rule name.
Optional In Bind to process group, select the process group from the dropdown.
Under Custom source paths, select Windows Event Log for the Log source type.
In the Event log full name field, enter the full name for the event log source.
Select Create.
If required, add the corresponding ingest rule.
For Windows event logs, log monitoring detects the following fields and sends them as custom attributes:
| Semantic attribute name | Configuration matcher name | Event property | Description |
|---|---|---|---|
| Windows log record keywords |
| A bitmask of the keywords defined in the event. Keywords are used to classify types of events (for example, events associated with reading data). |
| Windows log record user name |
| The user name of the event provider that logged the event. |
|
| The severity level defined in the event. This attribute is not available in the configuration matchers, but you can use the Log record level instead. | |
| Windows log record event ID |
| The identifier that the provider used to identify the event. |
| Windows log record source |
| Identifies the provider that logged the event. |
| Windows log record task category |
| The task defined in the event. Task and opcode are typically used to identify the location in the application from where the event was logged. |
| Windows log record operational code |
| The opcode defined in the event. Task and opcode are typcially used to identify the location in the application from where the event was logged. |
This feature enables the collection of structured data from Windows Event Logs in the User Data or Event Data branches (depending on the availability), along with their sub-branches. The collected data is transmitted along with the record content in the form of attributes.
To enable this feature, go to
Settings > Collect and capture > Log monitoring > Configure log module > Opt-in feature flags, and turn on the Collect data via OneAgent from Event Logs in the User Data and Event data sections feature flag.
Attribute names are assigned based on available information, such as tag names, the value of the Name field, or, if tag names are repeated and the Name field is absent, a sequential number is added to the tag name.
winlog.data.Given below are examples of branches and attributes:
Event log raw data:
- <EventData><Data Name="CallerProcessId">16548</Data><Data Name="CallerProcessImageName">vctip</Data><Data Name="Type">client</Data></EventData>
Parsed attributes:
AttributeKey: winlog.data.CallerProcessId, AttributeValue: 16548AttributeKey: winlog.data.CallerProcessImageName, AttributeValue: vctipAttributeKey: winlog.data.Type, AttributeValue: client
Event log raw data:
- <UserData>- <CbsPackageChangeState xmlns="http://manifests.microsoft.com/win/2004/08/windows/setup_provider"><PackageIdentifier>KB5058405</PackageIdentifier><IntendedPackageState>5112</IntendedPackageState><IntendedPackageStateTextized></IntendedPackageStateTextized></CbsPackageChangeState></UserData>
Parsed attributes:
AttributeKey: winlog.data.CbsPackageChangeState.<xmlattr>.xmlns, AttributeValue: http://manifests.microsoft.com/win/2004/08/windows/setup_providerAttributeKey: winlog.data.CbsPackageChangeState.PackageIdentifier, AttributeValue: KB5058405AttributeKey: winlog.data.CbsPackageChangeState.IntendedPackageState, AttributeValue: 5112
Event log raw data:
- <EventData><Data>WinRT Intellisense PPI - en-us</Data><Data>10.1.19041.685</Data><Data>(NULL)</Data><Data /><Binary>7B31354532394146462D434231392D413230422D394138312D4230373635413633313135467D3030303063306133616532343933363166643732376335306533653966623534363139633030303030393034</Binary><Data>Test</Data></EventData>
Parsed attributes:
AttributeKey: winlog.data.Data1, AttributeValue: WinRT Intellisense PPI - en-usAttributeKey: winlog.data.Data2, AttributeValue: 10.1.19041.685AttributeKey: winlog.data.Data3, AttributeValue: (NULL)AttributeKey: winlog.data.Data5, AttributeValue: Test