Deploy the Collector for Windows with Ansible
Describes how to install the Splunk Observability Cloud OpenTelemetry Collector Ansible role on Windows.
Before installing the Ansible collection, check Get started with the Splunk Distribution of the OpenTelemetry Collector to verify the required resources:
-
Find your Splunk access token
-
Find your Splunk realm
-
Check your exposed ports to make sure your environment doesn’t have conflicts. You can change ports in the package’s configuration.
Supported versions
Currently, the following Windows versions are supported:
-
Windows Server 2016 64-bit
-
Windows Server 2019 64-bit
-
Windows Server 2022 64-bit
-
Windows Server 2025 64-bit
Requirements
-
Use PowerShell 3.0 or higher and .NET 4.0 or higher to be installed on the Windows host.
-
Create and activate a WinRM listener.
For information on setting up the Windows host see the Ansible documentation.
Install and use the Collector with Ansible
-
Run the following command to install the Ansible collection from Ansible Galaxy:
- Ansible Galaxy
-
POWERSHELL
ansible-galaxy collection install signalfx.splunk_otel_collector - Ansible Automation Hub
-
POWERSHELL
ansible-galaxy collection install cisco.splunk_otel_collector
-
Configure your Ansible playbook.
To use the Splunk OpenTelemetry Collector role, include the
signalfx.splunk_otel_collector.collector roleinvocation in your playbook. Note that this role requires root access. For more information, see Splunk OpenTelemetry Collector Ansible Role .The following examples show how to use the role in a playbook with minimal required configuration:
Tip:splunk_hec_tokenis optional.- Ansible Galaxy
-
POWERSHELL
- name: Install the Splunk Distribution of OpenTelemetry Collector hosts: all become: yes # For Windows "become: yes" will raise error. # "The Powershell family is incompatible with the sudo become plugin". Remove "become: yes" tag to run on Windows tasks: - name: "Include splunk_otel_collector" include_role: name: "signalfx.splunk_otel_collector.collector" vars: splunk_access_token: YOUR_ACCESS_TOKEN splunk_hec_token: YOUR_HEC_TOKEN splunk_realm: SPLUNK_REALM - Ansible Automation Hub
-
POWERSHELL
- name: Install the Splunk Distribution of OpenTelemetry Collector hosts: all become: yes # For Windows "become: yes" will raise error. # "The Powershell family is incompatible with the sudo become plugin". Remove "become: yes" tag to run on Windows tasks: - name: "Include splunk_otel_collector" include_role: name: "cisco.splunk_otel_collector.collector" vars: splunk_access_token: YOUR_ACCESS_TOKEN splunk_hec_token: YOUR_HEC_TOKEN splunk_realm: SPLUNK_REALM
Configuration variables
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.
|
Variable |
Description |
|---|---|
|
|
Replaces |
|
|
The Splunk access token to authenticate requests. This attribute is required. |
|
|
The realm to send the data to. This variable is set with this value for the service. The default value is |
|
|
The Splunk ingest URL, for example, |
|
|
The Splunk API URL, for example, |
|
|
The Splunk trace endpoint URL, for example, |
|
|
The Splunk HEC endpoint URL, for example, |
|
|
The version of the package to install, for example, |
|
|
The configuration file, created in YAML. This variable can be set to |
|
|
The custom configuration that is merged into the default configuration. |
|
|
The variable used to configure the |
|
|
This is the source path to a configuration file on your control host that is uploaded and set in place of the value set in |
|
|
The path to the bundle directory. The default path is provided by the package. If the specified path is changed from the default value, the path should be an existing directory on the node. This variable is set with this value for the service. The default location is |
|
|
The path to the collectd configuration directory for the bundle. The default path is provided by the package. If the specified path is changed from the default value, the path should be an existing directory on the node. This variable is set with this value for the service. The default location is |
|
|
The amount of allocated memory in MiB. The default value is |
|
|
|
Next steps
After you have installed the package, see:
-
View logs and errors in the Windows Event Viewer. Search for "view logs and errors" on the Microsoft documentation site for more information.