Advanced configuration for Windows

Optional configurations for the Splunk Distribution of OpenTelemetry Collector for Windows.

The Collector comes with a default configuration. To learn more, see Collector for Windows default configuration.

Send Windows metrics to the Splunk platform

Note: This guidance covers metrics collection with the Windows installer script.

Use the Windows installer script to collect host metrics with the Collector and send them to Splunk Enterprise or Splunk Cloud Platform.

Prerequisites

  • A running Splunk Enterprise or Splunk Cloud Platform deployment.

  • A Splunk HEC token with write access to the target metrics index. For more information, see Use HTTP Event Collector.

  • A metrics index in Splunk Enterprise or Splunk Cloud Platform. For more information, see Get started with metrics.

  • Splunk Distribution of OpenTelemetry Collector v0.157.0 or higher.

Install the Collector with metrics collection enabled

Pass the Splunk HEC endpoint URL, token, and target metrics index to the installer by using msi_public_properties.

POWERSHELL
& {
  Set-ExecutionPolicy Bypass -Scope Process -Force
  $script = (New-Object System.Net.WebClient).DownloadString('https://dl.observability.splunkcloud.com/splunk-otel-collector.ps1')

  $params = @{
    msi_public_properties = "SPLUNK_PLATFORM_URL=<URL> SPLUNK_PLATFORM_TOKEN=<TOKEN> SPLUNK_PLATFORM_METRICS_INDEX=<INDEX>"
  }
  & ([scriptblock]::Create($script)) @params
}

To also send metrics and traces to Splunk Observability Cloud, include your Splunk Observability Cloud access token and realm:

POWERSHELL
& {
  Set-ExecutionPolicy Bypass -Scope Process -Force
  $script = (New-Object System.Net.WebClient).DownloadString('https://dl.observability.splunkcloud.com/splunk-otel-collector.ps1')

  $params = @{
    access_token = "<ACCESS_TOKEN>"
    realm = "<REALM>"
    msi_public_properties = "SPLUNK_PLATFORM_URL=<URL> SPLUNK_PLATFORM_TOKEN=<TOKEN> SPLUNK_PLATFORM_METRICS_INDEX=<METRICS_INDEX>"
  }
  & ([scriptblock]::Create($script)) @params
}

Installer options

Use these MSI public properties to send Windows metrics to the Splunk platform:

Property

Description

SPLUNK_PLATFORM_URL=<url>

Required. The Splunk HEC endpoint URL, such as https://splunk.example.com:8088/services/collector.

SPLUNK_PLATFORM_TOKEN=<token>

Required. The Splunk HEC token that authenticates requests to the Splunk platform.

SPLUNK_PLATFORM_METRICS_INDEX=<index>

Required. The Splunk metrics index to send metrics to. This property enables Splunk platform metrics collection.

Collected metrics

By default, the Collector uses the windowsperfcounters receiver to collect system metrics from the Windows host. Metrics collected by default come from performance counter objects such as Processor, Processor Information, LogicalDisk, PhysicalDisk, Memory, Network Interface, Process, System, DFS Replicated Folders, NTDS, and DNS.

For more information about the receiver, see Windows Performance Counters receiver.

Activate or deactivate performance counters

  1. Edit C:\ProgramData\Splunk\OpenTelemetry Collector\splunk_metrics_config_windows.yaml and comment, uncomment, or add counters:

    YAML
    windowsperfcounters/cpu:
      collection_interval: 10s
      perfcounters:
        - object: Processor
          instances: ["*"]
          counters:
            - name: "% Processor Time"
            - name: "% User Time"
            - name: "% Privileged Time"
            - name: "Interrupts/sec"
            - name: "% DPC Time"
            - name: "% Interrupt Time"
  2. Restart the Collector service:

    POWERSHELL
    Restart-Service splunk-otel-collector

Verify metrics ingestion

Run a metrics search in Splunk Cloud Platform or Splunk Enterprise to confirm that metrics are arriving in the target index:

CODE
| mpreview index="<your-index>"

Change the default configuration file for the Collector for Windows

All installation methods offer default configurations using environment variables. Before starting the splunk-otel-collector service, replace the variables in the default configuration file with the appropriate values for your environment.

Note: You can use the legacy or new API and service endpoint URLs as of March 24, 2026. The legacy endpoints have the domain signalfx, and the new endpoints have the domain observability.splunkcloud. Thus, you can use the legacy ingest endpoint ingest.realm.signalfx.com or the new ingest endpoint ingest.realm.observability.splunkcloud.com. See Splunk Observability Cloud domain change for more information.
Splunk-specific environment variables are listed on the table below:

Name

Description

Default config?

SPLUNK_ACCESS_TOKEN

The Splunk access token to authenticate requests.

Yes

SPLUNK_API_URL

The Splunk API URL. For example, https://api.us0.observability.splunkcloud.com.

Yes

SPLUNK_BALLAST_SIZE_MIB (deprecated)

memory_ballast is deprecated. If you’re using this variable, see how to update your configuration.

No

SPLUNK_BUNDLE_DIR

The path to the Smart Agent bundle. For example, /usr/lib/splunk-otel-collector/agent-bundle.

Yes

SPLUNK_COLLECTD_DIR

The path to the collectd config directory for the Smart Agent. For example, /usr/lib/splunk-otel-collector/agent-bundle/run/collectd.

Yes

SPLUNK_CONFIG

Destination path of the Collector custom configuration file.

No

SPLUNK_CONFIG_YAML

Specifies your custom configuration YAML. This is useful in environments where access to the underlying file system is not readily available.

No

SPLUNK_DEBUG_CONFIG_SERVER (deprecated)

By default, the Collector provides a sensitive value-redacting, local config server listening at http://localhost:55554/debug/configz/effective, which is helpful in troubleshooting. To deactivate it, set SPLUNK_DEBUG_CONFIG_SERVER to any value other than true. To set the desired port to listen to, use SPLUNK_DEBUG_CONFIG_SERVER_PORT.

No

SPLUNK_HEC_TOKEN

The Splunk HEC authentication token.

Yes

SPLUNK_HEC_URL

The Splunk HEC endpoint URL. For example, https://ingest.us0.observability.splunkcloud.com/v1/log.

Yes

SPLUNK_INGEST_URL

The Splunk ingest URL. For example, https://ingest.us0.observability.splunkcloud.com.

Yes

SPLUNK_LISTEN_INTERFACE

The network interface the agent receivers listen on. 0.0.0.0 by default.

Yes

SPLUNK_MEMORY_LIMIT_MIB

Use it to set the memory limit for the memory_limiter processor. 512 MiB by default.

No

SPLUNK_OPAMP_SUPERVISOR_ENABLED

Set to true to manage the Collector with the OpAMP Supervisor Windows hosts. If unset or false, the Collector continues to run directly. OpAMP Supervisor mode is not supported by the Collector Docker image. See OpenTelemetry Fleet Management to understand when to use the supervisor.

No

SPLUNK_MEMORY_TOTAL_MIB

Total memory in MiB to allocate to the Collector. SPLUNK_MEMORY_TOTAL_MIB sets GOMEMLIMIT of the Collector, although an explicit GOMEMLIMIT setting takes precedence.

No

SPLUNK_REALM

Your Splunk realm.

No

SPLUNK_TRACE_URL

The Splunk trace endpoint URL. For example, https://ingest.us0.observability.splunkcloud.com/v2/trace.

Yes

SPLUNK_*_URL environment variables are automatically derived from SPLUNK_REALM. For example, SPLUNK_INGEST_URL = https://ingest.SPLUNK_REALM.observability.splunkcloud.com.

Note: When configuring additional settings, use service, process, or terminal scopes.

Based on the specified installation parameters, the environment variables are saved to the HKLM:\SYSTEM\CurrentControlSet\Services\splunk-otel-collector registry key and set on the Environment entry.

To modify any of the configuration values, run regedit and browse to the path.

Use the following environment variables to send Windows logs and metrics to the Splunk platform:

Variable

Description

SPLUNK_PLATFORM_URL

Required. The Splunk HEC endpoint URL, such as https://splunk.example.com:8088/services/collector.

SPLUNK_PLATFORM_TOKEN

Required. The Splunk HEC token that authenticates requests to the Splunk platform.

SPLUNK_PLATFORM_LOGS_INDEX

The Splunk index to send logs to.

SPLUNK_PLATFORM_METRICS_INDEX

The Splunk index to send metrics to.

Configure account rights for least privilege on Windows

To harden the collector deployment, run the collector under a service account with these privileges:

  • SeServiceLogonRight - required to launch the service.

  • SeBackupPrivilege - gives the service access to all files on the system.

  • SeSecurityPrivilege - gives the service access to the security logs and audit events.

In addition, give the service account the following memberships:

  • Performance Monitor Users (domain group) - gives the service account the ability to monitor performance counters.

Configure memory allocation

To configure memory allocation, use the memory parameter, which sets the environment variable SPLUNK_MEMORY_TOTAL_MIB.

  • By default, the Collector is configured to use 512 MiB of memory.

  • To modify this setting, replace SPLUNK_MEMORY_TOTAL_MIB with the desired integer value.

POWERSHELL
& {Set-ExecutionPolicy Bypass -Scope Process -Force; $script = ((New-Object System.Net.WebClient).DownloadString('https://dl.observability.splunkcloud.com/splunk-otel-collector.ps1')); $params = @{access_token = "SPLUNK_ACCESS_TOKEN"; realm = "SPLUNK_REALM"; memory = "SPLUNK_MEMORY_TOTAL_MIB"}; Invoke-Command -ScriptBlock ([scriptblock]::Create(". {$script} $(&{$args} @params)"))}

Read more about Collector sizing in Sizing and scaling.

Configure proxy settings

To configure proxy settings to install and run the OpenTelemetry Collector, see Configure proxy settings for the Collector.

Command line options

To add or remove command line options for the splunk-otel-collector service, run regedit and modify the ImagePath value in the HKLM:\SYSTEM\CurrentControlSet\Services\splunk-otel-collector registry key.

Alternatively, run the following PowerShell command, replacing OPTIONS with the desired command line options:

CODE
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\splunk-otel-collector" -name "ImagePath" -value "C:\Program Files\Splunk\OpenTelemetry Collector\otelcollauncher.exe OPTIONS"

For example, to change the default exposed metrics address of the Collector to 0.0.0.0:9090, run the following PowerShell command:

CODE
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\splunk-otel-collector" -name "ImagePath" -value "C:\Program Files\Splunk\OpenTelemetry Collector\otelcollauncher.exe --metrics-addr 0.0.0.0:9090"

Use multiple configuration files

When you provide multiple configuration files, add the --feature-gates=confmap.enableMergeAppendOption option to the Collector command line.

POWERSHELL
& 'C:\Program Files\Splunk\OpenTelemetry Collector\otelcol.exe' `
  --config 'C:\ProgramData\Splunk\OpenTelemetry Collector\agent_config.yaml' `
  --config 'C:\ProgramData\Splunk\OpenTelemetry Collector\splunk_logs_config_windows.yaml' `
  --config 'C:\ProgramData\Splunk\OpenTelemetry Collector\splunk_metrics_config_windows.yaml' `
  --feature-gates=confmap.enableMergeAppendOption

Apply the changes

After modifying the configuration file or registry key, apply the changes by restarting the system or running the following PowerShell commands:

POWERSHELL
Stop-Service splunk-otel-collector
Start-Service splunk-otel-collector

Available command line options

To see all available command line options, run the following PowerShell command:

POWERSHELL
& 'C:\Program Files\Splunk\OpenTelemetry Collector\otelcol.exe' --help