Skip to main content

Windowseventlog Receiver

Status Available in: contrib Maintainers: @mrsillydog, @pjanotti Source: opentelemetry-collector-contrib

Supported Telemetry

Logs

Overview

Configuration Fields

Feature Gates

Operators

Each operator performs a simple responsibility, such as parsing a timestamp or JSON. Chain together operators to process logs into a desired format.
  • Every operator has a type.
  • Every operator can be given a unique id. If you use the same type of operator more than once in a pipeline, you must specify an id. Otherwise, the id defaults to the value of type.
  • Operators will output to the next operator in the pipeline. The last operator in the pipeline will emit from the receiver. Optionally, the output parameter can be used to specify the id of another operator to which logs will be passed directly.
  • Only parsers and general purpose operators should be used.

Additional Terminology and Features

  • An entry is the base representation of log data as it moves through a pipeline. All operators either create, modify, or consume entries.
  • A field is used to reference values in an entry.
  • A common expression syntax is used in several operators. For example, expressions can be used to filter or route entries.
  • timestamp parsing is available as a block within all parser operators, and also as a standalone operator. Many common timestamp layouts are supported.
  • severity parsing is available as a block within all parser operators, and also as a standalone operator. Stanza uses a flexible severity representation which is automatically interpreted by the stanza receiver.

Example Configurations

Simple

Configuration:
The deprecated component type windowseventlog is still accepted:
Output entry sample:
The event_data field format is controlled by the event_data_format setting: event_data_format: map (default) — Named <Data> elements become direct keys (e.g., event_data.ProcessId). Anonymous <Data> elements (without a Name attribute) use numbered keys: param1, param2, etc. Fields are directly accessible via OTTL: body["event_data"]["ProcessId"]. event_data_format: array — Preserves the legacy format where data is stored as a nested data array of single-key maps:
The rendering_info key is populated when suppress_rendering_info is false (the default). It contains the human-readable strings for level, task, opcode, keywords, message, channel, provider, and culture as rendered by the publisher manifest. The top-level level, task, opcode, and keywords fields are derived from rendering_info when present, falling back to the raw system values otherwise. For events that use UserData instead of EventData (e.g., Security event 1102 — audit log cleared), a user_data key is emitted instead of (or alongside) event_data:

Remote Configuration

If collection of the local event log is desired, a separate receiver needs to be created. Requirements for Remote Configuration:
  • The remote computer must enable the “Remote Event Log Management” Windows Firewall exception. Otherwise, when you try to use the session handle, the call will error with RPC_S_SERVER_UNAVAILABLE.
  • The computer to which you are connecting must be running Windows Vista or later.
Single server configuration:

XML Queries

You can use XML queries to filter events. The query is passed to the query field in the configuration. The provided query must be a valid XML string. See XML Event Queries The following example only forwards logs from the Application from foo or bar providers.

SID Resolution

Windows Event Logs often contain Security Identifiers (SIDs) instead of readable user or group names. The SID resolution feature automatically resolves these SIDs to human-readable names using the Windows Local Security Authority (LSA) API. Key Features:
  • Automatically enriches Windows events with resolved user and group names
  • High-performance LRU cache with configurable size and TTL
  • Resolves well-known SIDs (SYSTEM, LOCAL_SERVICE, etc.) instantly from static map
  • Works with domain-joined machines to resolve domain users and groups
  • Non-breaking: original SID values are preserved alongside resolved names
Configuration:
Without SID Resolution:
With SID Resolution:
Performance Characteristics:
  • Cache hit latency: < 1 microsecond
  • Cache miss latency: < 5 milliseconds (Windows LSA API call)
  • Expected cache hit rate: > 99% in steady state
  • Memory usage: ~100 bytes per cached entry
  • Throughput impact: < 5% with cache enabled
Limitations:
  • Only resolves SIDs for the local system or the domain the Windows machine is joined to
  • Cannot resolve SIDs from trusted domains (requires LDAP extension)
  • Remote collection: SID resolution only works when the collector runs on Windows
  • Cache lifecycle: Cache is created at receiver start and closed at shutdown
Troubleshooting: If SID resolution is not working as expected:
  1. Check logs for initialization message:
  2. Verify the collector is running on Windows: SID resolution only works on Windows operating systems.
  3. Check for resolution errors: Failed SID lookups are logged at DEBUG level:
  4. Verify SID format: Only fields ending with “Sid” or named “UserID” are automatically resolved. Custom SID fields may not be detected.
Well-Known SIDs: The following SIDs are resolved instantly from a static map (no API call required):
  • S-1-5-18 - NT AUTHORITY\SYSTEM
  • S-1-5-19 - NT AUTHORITY\LOCAL SERVICE
  • S-1-5-20 - NT AUTHORITY\NETWORK SERVICE
  • S-1-5-32-544 - BUILTIN\Administrators
  • S-1-1-0 - Everyone
  • And 40+ more common Windows SIDs

Configuration

Example Configuration


Last generated: 2026-08-24