Windows Event
Synopsis
Turns a Windows event's XML into the record the VirtualMetric agent sends for the same event: the agent's ECS fields @timestamp, event, host, log, user, execution, message, message_summary and winlog.
A Windows Event Collector (WEC) device writes each event's XML as Windows forwards it. A pipeline written for the agent's records runs this processor first, and then reads a WEC device's events the same way.
Schema
- windows_event:
field: <ident>
target_field: <ident>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
disabled: <boolean>
Configuration
The following fields are used to define the processor:
| Field | Required | Default | Description |
|---|---|---|---|
field | N | message | Field that holds the event's XML |
target_field | N | - | Field the agent's record is written to. When unset, the record replaces the XML at the top of the record |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue if the field doesn't hold a Windows event's XML |
ignore_missing | N | false | Continue if field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
disabled | N | false | When true, the processor is skipped and the event continues to the next one. Lets you take a processor out of the path without removing its configuration |
Details
The processor builds the record with the agent's own conversion, so a WEC device's event and the agent's record of the same event carry the same fields with the same values.
When target_field is unset, the XML in field is removed and the agent's fields are written at the top of the record, beside the fields the record already had. When target_field is set, the agent's record is written there and the XML stays where it was.
One difference from the agent's record remains. When an event names its user by SID, the agent also writes the user's name and domain, which it looks up on its own computer. A Director can't look them up, so the record has user.id but no user.name or user.domain.
The processor refuses anything that isn't a Windows event's XML, meaning a document whose root element isn't Event. The processor leaves the record as it was and fails. With ignore_failure set, the record goes on through the pipeline unchanged. An on_failure handler that recovers the error lets it go on as well, with whatever the handler changed. Otherwise the default error handler drops it, as Handling Failures describes.
An event's own text is written as it is. Template text such as {{host.name}} in an event's message stays as it is, and is not replaced with a value from the record.
An event sent without rendered text, by a subscription with the Events content format, has no message field in the record. A subscription with the RenderedText content format, the WEC device's default, sends the rendered text, which becomes message.
Examples
Event XML from a WEC Device
A Security event as a WEC device writes it... | |
becomes the agent's record of the event (some fields shown): | |
Keeping the XML
Writing the agent's record to its own field... | |
leaves the XML where it was: | |
Event Without Rendered Text
A System event from a subscription with the | |
has no | |
Something Other Than an Event
A record whose field holds plain text... | |
is left as it was: | |