Install OpenTelemetry Collector on Windows
Follow the steps in this topic to install or uninstallย an OpenTelemetry Collector on Windows.ย See OpenTelemetry Collectorย for information on other operating systems.
System Requirementsโ
Minimal resource requirements are the following:
- 200 MB of disk space
- 64 MB of RAM
Supported Versions
- Windows 10 and up, Windows Server 2016 and up
Installโ
You can install our OpenTelemetry Collector using either of the following methods:
UI Installationโ
- Classic UI. In the main Sumo Logic menu, select Manage Data > Collection > OpenTelemetry Collection.
New UI. In the Sumo Logic top menu select Configuration, and then under Data Collection select OpenTelemetry Collection. You can also click the Go To... menu at the top of the screen and select OpenTelemetry Collection. - On the OpenTelemetry Collection page, click Add Collector.
- On the left panel, select Windows as the platform.
- Select/create installation token and customize your tags.
- (Optional) Select the Auto Configure Host and Process metrics data collection checkbox to collect host and process metrics.
- Copy the command.
- Open PowerShell and execute the command in the PowerShell where the collector needs to be installed.
- Wait for the installation process to complete, then click Next to proceed.
Install Scriptโ
A single line installation powered by Install Script.
Get the Installation Tokenโ
Get your installation token if you do not have it already. We are going to refer to this token as <TOKEN>
in next streps.
Run Installation Scriptโ
Run the following command in the same PowerShell window, replacing <TOKEN>
with your token from previous step:
Set-ExecutionPolicy RemoteSigned -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; $uri = "https://github.com/SumoLogic/sumologic-otel-collector-packaging/releases/latest/download/install.ps1"; $path="${env:TEMP}\install.ps1"; (New-Object System.Net.WebClient).DownloadFile($uri, $path); . $path -InstallationToken "<TOKEN>" -Tags @{"host.group" = "default"; "deployment.environment" = "default"}
The script is going to perform the following operations:
- Install or upgrade operation by placing the latest version as
C:\Program Files\Sumo Logic\OpenTelemetry Collector\bin
- Get static configuration and place it as
C:\ProgramData\Sumo Logic\OpenTelemetry Collector\config\sumologic.yaml
- Create user configuration directory (
C:\ProgramData\Sumo Logic\OpenTelemetry Collector\config\conf.d
) withcommon.yaml
file which will contain installation token - Create
OtelcolSumo
(Sumo Logic OpenTelemetry Collector
) service
Script Optionsโ
Name | Description | Takes Value |
---|---|---|
-InstallationToken | Installation token | Yes |
-Tags | Sets tags for collector. This argument should be a map. | Yes, for example @{"host.group" = "default"; "deployment.environment" = "default"} |
-InstallHostMetrics | Installs the hostmetrics configuration to collect host metrics. The default is $False . | Yes, for example: -InstallHostMetrics $True or -InstallHostMetrics $False . |
-Fips | If set to $True , installs the FIPS-compliant binary. The default is $False . See FIPS section for more details. | Yes, for example: -Fips $True or -Fips $False |
-Version | Version of Sumo Logic Distribution for OpenTelemetry Collector to install. By default, it gets latest version. | Yes, for example: -Version 0.94.0-sumo-2 |
Manual Step-by-Step Installationโ
- Go to the latest release documentation.
- Download
otelcol-sumo_x.y.z.0_en-US.x64.msi
from theAssets
section.
- Run Installer.
- Read and accept End-User License Agreement.
- Select binary destination.
- Set Installation Token and Tags properties.
- Click Install to begin installation.
- Wait for installation to be completed.
- You can modify configuration, which should be placed in
C:\ProgramData\Sumo Logic\OpenTelemetry Collector\config
directory.noteC:\ProgramData
directory is hidden by default.
Verify the Installationโ
Run the following command in PowerShell:
> Get-Service OtelcolSumo
Status Name DisplayName
------ ---- -----------
Running OtelcolSumo Sumo Logic OpenTelemetry Collector
Alternatively, you can open Services.msc
and check whether Sumo Logic OTel Collector Service is running or not.
Additional Settingsโ
This section describes common OpenTelemetry customizations.
Using Proxyโ
Exporters leverage the HTTP communication and respect the following proxy environment variables:
HTTP_PROXY
HTTPS_PROXY
NO_PROXY
You can set it by adding the following properties to Windows Registry key HKLM:\SYSTEM\CurrentControlSet\Services\OtelcolSumo\Environment
:
FTP_PROXY=<PROXY-ADDRESS>:<PROXY-PORT>
HTTP_PROXY=<PROXY-ADDRESS>:<PROXY-PORT>
HTTPS_PROXY=<PROXY-ADDRESS>:<PROXY-PORT>
You can do it using the following PowerShell command:
Set-ItemProperty `
-Path 'HKLM:\SYSTEM\CurrentControlSet\Services\OtelcolSumo' `
-Name Environment `
-Type MultiString `
-Value "FTP_PROXY=<PROXY-ADDRESS>:<PROXY-PORT>",
"HTTP_PROXY=<PROXY-ADDRESS>:<PROXY-PORT>",
"HTTPS_PROXY=<PROXY-ADDRESS>:<PROXY-PORT>"
To exclude a specific domain or IP address from using the proxy, you can add it to the NO_PROXY
environment variable. For example, to exclude the domain sumologic.com
from using the proxy, you can add the following line:
NO_PROXY=sumologic.com
Restart Sumo Logic OpenTelemetry Collector
(OtelcolSumo
) service to apply the changes.
FIPSโ
To install FIPS compliant binary, add -Fips $True
option to the installation command.
Refer to BoringCrypto and FIPS compliance in our repository for more details.
Uninstallโ
- Go to Add or remove programs.
- Find OpenTelemetry Collector and click Uninstall.
- Confirm the uninstallation.
Upgrading the Collectorโ
To upgrade the collector perform installation step and it will automatically upgrade the binary in-place.
Troubleshootingโ
Cannot restart service during Installationโ
If you get the following output while restarting the service:
> Restart-Service -Name OtelcolSumo
Restart-Service : Service 'Sumo Logic OpenTelemetry Collector (OtelcolSumo)' cannot be stopped due to the following
error: Cannot open OtelcolSumo service on computer '.'.
At line:1 char:1
+ Restart-Service -Name OtelcolSumo
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (System.ServiceProcess.ServiceController:ServiceController) [Restart-Service
], ServiceCommandException
+ FullyQualifiedErrorId : CouldNotStopService,Microsoft.PowerShell.Commands.RestartServiceCommand
Ensure that you run PowerShell as an Administrator.
For information on troubleshooting and solutions, refer to the Troubleshooting.
Error when running the FIPS binary: panic: cngcrypto: not in FIPS mode
โ
If you installed the FIPS version of the OpenTelemetry Collector and are getting the following error when trying to run it:
C:\>"C:\Program Files\Sumo Logic\OpenTelemetry Collector\bin\otelcol-sumo.exe" --version
panic: cngcrypto: not in FIPS mode
goroutine 1 [running]:
crypto/internal/backend.init.0()
crypto/internal/backend/cng_windows.go:34 +0x85
This means you are running the Sumo Logic Otelcol FIPS binary in a non-FIPS environment. The FIPS binary is built using the requirefips
mode, which means that the collector only works in a FIPS-compliant environment and will fail to start otherwise.
To verify if your instance is in FIPS mode, open your registry editor and navigate to HKLM\System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy\Enabled.
- If the Enabled value is
1
, then FIPS is enabled successfully. - If the Enabled value is
0
, this means FIPS is not enabled. See the Build option to require FIPS mode documentation to enable it.