Install the Collector for Windows manually ๐
You can use Windows MSI to install the Splunk Distribution of the Collector for Windows.
Note
The Splunk Distribution of the OpenTelemetry Collector comes with a default configuration, as detailed in Collector for Windows default configuration. To modify this configuration, refer to Advanced configuration for Windows.
To learn how to obtain logs, see Collect logs for the Collector for Windows.
Alternatively, you can also install the Collector for Windows:
Using the installer script. See Install the Collector for Windows with the installer script.
Using MSI. See Install the Collector for Windows using the MSI installer.
Using deployment tools. See Install the Collector for Windows using deployment tools.
Prerequisites ๐
The Collector supports the following Windows versions, depending on the installation method:
Install method |
Supported versions (64-bit) |
---|---|
Installer script |
Windows 10 Pro and Home, Windows Server 2016, 2019, 2022 |
Windows installer (MSI) |
Windows 10 Pro and Home, Windows Server 2016, 2019, 2022 |
Ansible |
Windows 10 Pro and Home, Windows Server 2016, 2019, 2022 |
Chef |
Windows 10 Pro and Home, Windows Server 2019, 2022 |
Nomad |
Windows 10 Pro and Home, Windows Server 2016, 2019 |
Puppet |
Windows 10 Pro and Home, Windows Server 2016, 2019 |
Docker |
Windows 10 Pro and Home, Windows Server 2019, 2022 |
Note
PowerShell 3.0 or higher is required.
Install the Collector for Windows using Docker ๐
Run the following command to deploy the latest Docker image:
$ docker run --rm -e SPLUNK_ACCESS_TOKEN=12345 -e SPLUNK_REALM=us0 `
-p 13133:13133 -p 14250:14250 -p 14268:14268 -p 4317:4317 -p 6060:6060 `
-p 8888:8888 -p 9080:9080 -p 9411:9411 -p 9943:9943 `
--name=otelcol quay.io/signalfx/splunk-otel-collector-windows:latest
Install the Collector for Windows using the binary file ๐
To install the Collector using the binary file, follow these steps:
Download the binary for your architecture from GitHub releases .
If youโre not using an existing or custom config file, download the default config file <https://github.com/signalfx/splunk-otel-collector/tree/main/cmd/otelcol/config/collector>` for the Collector. See more at Collector for Windows default configuration.
Run the binary from the command line:
# see available command-line options
PS> & '<download dir>\otelcol_windows_amd64.exe' --help
Usage of otelcol:
--config string Locations to the config file(s), note that only a single location can be set per flag entry e.g. --config=/path/to/first --config=path/to/second. (default "[]")
--feature-gates string Comma-delimited list of feature gate identifiers. Prefix with '-' to disable the feature. '+' or no prefix will enable the feature. (default "[]")
--no-convert-config Do not translate old configurations to the new format automatically. By default, old configurations are translated to the new format for backward compatibility.
--set string Set arbitrary component config property. The component has to be defined in the config file and the flag has a higher precedence. Array config properties are overridden and maps are joined. Example --set=processors.batch.timeout=2s (default "[]")
-v, --version Version of the collector.
# set the SPLUNK_REALM and SPLUNK_ACCESS_TOKEN env vars required in our default config files
PS> $env:SPLUNK_REALM = "<realm>"
PS> $env:SPLUNK_ACCESS_TOKEN = "<token>"
# start the collector
PS> & '<download dir>\otelcol_windows_amd64.exe' --config=<path to config file>
# alternatively, use the SPLUNK_CONFIG env var instead of the --config command-line option
PS> $env:SPLUNK_CONFIG = "<path to config file>"
PS> & '<download dir>\otelcol_windows_amd64.exe'
# type Ctrl-c to stop the collector
Use a custom configuration file ๐
If youโre using a custom configuration file, mount the directory containing the file and either use the SPLUNK_CONFIG=<path>
environment variable or the --config=<path>
command line argument. Replace <path>
with the path to the custom file within the container.
To mount configuration files on a Windows container, specify a directory name in which the configuration file is present.
Example with SPLUNK_CONFIG
๐
$ docker run --rm -e SPLUNK_ACCESS_TOKEN=12345 -e SPLUNK_REALM=us0 `
-e SPLUNK_CONFIG=c:\splunk_config\gateway_config.yaml -p 13133:13133 `
-p 14250:14250 -p 14268:14268 -p 4317:4317 -p 6060:6060 -p 8888:8888 -p 9080:9080 `
-p 9411:9411 -p 9943:9943 -v ${PWD}\splunk_config:c:\splunk_config:RO `
--name otelcol quay.io/signalfx/splunk-otel-collector-windows:latest
Example with --config
๐
$ docker run --rm -e SPLUNK_ACCESS_TOKEN=12345 -e SPLUNK_REALM=us0 `
-p 13133:13133 -p 14250:14250 -p 14268:14268 -p 4317:4317 -p 6060:6060 `
-p 8888:8888 -p 9080:9080 -p 9411:9411 -p 9943:9943 `
-v ${PWD}\splunk_config:c:\splunk_config:RO `
--name otelcol quay.io/signalfx/splunk-otel-collector-windows:latest `
--config c:\splunk_config\gateway_config.yaml
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.