Deploy the Collector with Ansible for 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
Requirements đź”—
Ansible requires PowerShell 3.0 or higher and .NET 4.0 or higher to be installed on the Windows host.
You must create and activate a WinRM listener.
You can find information on setting up the Windows host on the Ansible Documentation site .
Install and use the Collector with Ansible đź”—
Caution
On Windows, the Collector is installed as a Windows service and its environment variables are set at the service scope, so they’re only available to the Collector service and not to the entire machine.
Run the following command to install the Ansible collection from Ansible Galaxy:
ansible-galaxy collection install signalfx.splunk_otel_collector
To use the Splunk OpenTelemetry Collector role, include the signalfx.splunk_otel_collector.collector role
invocation in your playbook. Note that this role requires root access. For more information, see Splunk OpenTelemetry Collector Ansible Role .
The following example shows how to use the role in a playbook with minimal required configuration:
- 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
Note that splunk_hec_yoken
is optional.
Configuration variables đź”—
The following table describes the variables that can be configured for this role:
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 |
|
|
|
The option to install or manage Fluentd and dependencies for log collection. The default value is |
|
The version of td-agent (Fluentd package) that is installed. |
|
The path to the Fluentd configuration file on the remote host. The default is |
|
The source path to a Fluentd configuration file on your control host that is uploaded and set in place of the value set in |
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.