Windows Installation
Install the OpenTelemetry Collector directly on Windows as a Windows Service.
Overview
This PowerShell script deploys the Coralogix OpenTelemetry Collector as a Windows Service. It supports both regular mode (local config) and supervisor mode (remote config via Fleet Management).
Prerequisites
- Windows 10/11, Windows Server 2016 or later
- PowerShell 5.1 or later
- Administrator privileges
- Coralogix Send-Your-Data API key
Important
Configuration Required
A configuration file must be provided when installing the collector. Use the example configuration from the otel-windows-standalone/build folder. Make sure to update the domain value in the configuration file to match your Coralogix domain.
Quick Start
Run the following command in an elevated PowerShell (Run as Administrator) to download the installer from GitHub and install with your config file:
$u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; $env:CORALOGIX_PRIVATE_KEY='<your-private-key>'; & $f -Config 'C:\path\to\your\config.yaml'
Replace <your-private-key> with your Send-Your-Data API key and C:\path\to\your\config.yaml with the path to your config file. Ensure the config file exists on the machine before running (e.g. create it in Notepad and save as C:\otel\config.yaml). Copy the command as a single line; the key must be in single quotes with a closing quote before the semicolon (e.g. 'your-key'; & $f).
Note: On Windows Server 2016 or older, prepend
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;to the command so the download from GitHub succeeds (GitHub requires TLS 1.2+).Note: For specific versions, see releases (look for
otel-installer-v*tags).
Environment Variables
Required Variables
| Variable | Required | Description |
|---|---|---|
| CORALOGIX_PRIVATE_KEY | Yes | Your Coralogix Send-Your-Data API key |
| CORALOGIX_DOMAIN | Supervisor mode only | Your Coralogix domain |
Automatically Set Variables
The installer automatically sets these environment variables for the collector service:
| Variable | Default | Description |
|---|---|---|
| OTEL_MEMORY_LIMIT_MIB | 512 | Memory limit in MiB (set via -MemoryLimit parameter) |
| OTEL_LISTEN_INTERFACE | 127.0.0.1 | Network interface for receivers (set via -ListenInterface parameter) |
To use these in your configuration file:
processors:
memory_limiter:
limit_mib: ${env:OTEL_MEMORY_LIMIT_MIB:-512}
receivers:
otlp:
protocols:
grpc:
endpoint: ${env:OTEL_LISTEN_INTERFACE:-127.0.0.1}:4317
Supported Platforms
Windows Versions
- Windows 10 (all editions)
- Windows 11 (all editions)
- Windows Server 2016 and later
Architectures
- x64 (amd64)
- ARM64
Install with Custom Configuration
To install with your own configuration file (script is downloaded from GitHub and run from temp):
$u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; $env:CORALOGIX_PRIVATE_KEY='<your-private-key>'; & $f -Config 'C:\path\to\config.yaml'
Install Specific Version
$u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; $env:CORALOGIX_PRIVATE_KEY='<your-private-key>'; & $f -Version 0.144.0
Install with Custom Memory Limit
$u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; $env:CORALOGIX_PRIVATE_KEY='<your-private-key>'; & $f -MemoryLimit 2048
Note: Your configuration must reference
${env:OTEL_MEMORY_LIMIT_MIB}for this to take effect.
Install as Gateway (Listen on All Interfaces)
By default, the collector listens only on 127.0.0.1. To accept connections from other hosts (gateway mode):
$u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; $env:CORALOGIX_PRIVATE_KEY='<your-private-key>'; & $f -ListenInterface 0.0.0.0
Note: Your configuration must reference
${env:OTEL_LISTEN_INTERFACE}for this to take effect.
Dynamic Metadata Parsing (IIS Logs)
Enable dynamic metadata parsing for file-based logs, such as IIS logs with header-based format detection:
$u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; $env:CORALOGIX_PRIVATE_KEY='<your-private-key>'; & $f -EnableDynamicIISParsing
This option creates a storage directory at C:\ProgramData\OpenTelemetry\Collector\storage and runs the collector with --feature-gates=filelog.allowHeaderMetadataParsing. Only available in regular mode, not supervisor mode.
Note: If your configuration file uses the
file_storageextension (e.g. for checkpoint state), you must also pass-EnableDynamicIISParsingso the installer creates the required storage directory. Without it, the service will fail to start with an error about the storage directory not existing.
Supervisor Mode
Supervisor mode enables remote configuration management through Coralogix Fleet Management.
Basic Installation
$u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; $env:CORALOGIX_DOMAIN='<your-domain>'; $env:CORALOGIX_PRIVATE_KEY='<your-private-key>'; & $f -Supervisor
Note: Supervisor mode requires version 0.144.0 or higher (Windows MSI is available from this version). If the detected version is lower, the script will automatically use 0.144.0.
With Specific Versions
$u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; $env:CORALOGIX_DOMAIN='<your-domain>'; $env:CORALOGIX_PRIVATE_KEY='<your-private-key>'; & $f -Supervisor -SupervisorVersion 0.144.0 -CollectorVersion 0.144.0
With Local MSI File
$u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; $env:CORALOGIX_DOMAIN='<your-domain>'; $env:CORALOGIX_PRIVATE_KEY='<your-private-key>'; & $f -Supervisor -SupervisorMsi 'C:\path\to\opampsupervisor.msi'
With Custom Base Collector Config
$u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; $env:CORALOGIX_DOMAIN='<your-domain>'; $env:CORALOGIX_PRIVATE_KEY='<your-private-key>'; & $f -Supervisor -SupervisorCollectorBaseConfig 'C:\path\to\collector.yaml'
The base config is merged with remote configuration from Fleet Manager. The config cannot contain the opamp extension (the supervisor manages the OpAMP connection).
Script Parameters
| Parameter | Description |
|---|---|
-Version <version> | Install specific collector version |
-Config <path> | Path to custom configuration file |
-MemoryLimit <MiB> | Total memory in MiB to allocate (default: 512) |
-ListenInterface <ip> | Network interface for receivers (default: 127.0.0.1) |
-Supervisor | Install with OpAMP Supervisor mode |
-SupervisorVersion <version> | Supervisor version (supervisor mode only) |
-CollectorVersion <version> | Collector version (supervisor mode only) |
-SupervisorMsi <path> | Path to local OpAMP Supervisor MSI file |
-SupervisorCollectorBaseConfig <path> | Path to base collector config for supervisor mode |
-SupervisorOpampConfig <path> | Path to custom OpAMP supervisor config file |
-EnableDynamicIISParsing | Enable dynamic IIS log parsing with header-based field detection |
-Uninstall | Remove the collector (keeps config) |
-Uninstall -Purge | Remove the collector and all configuration |
-Help | Show help message |
Installation Locations
Regular Mode
| Component | Location |
|---|---|
| Binary | C:\Program Files\OpenTelemetry Collector\otelcol-contrib.exe |
| Configuration | C:\ProgramData\OpenTelemetry\Collector\config.yaml |
| Service | otelcol-contrib (Windows Service) |
| Logs | Windows Event Log (Application) |
Supervisor Mode
| Component | Location |
|---|---|
| Collector Binary | C:\Program Files\OpenTelemetry Collector\otelcol-contrib.exe |
| Supervisor Binary | C:\Program Files\OpenTelemetry OpAMP Supervisor\opampsupervisor.exe |
| Supervisor Config | C:\Program Files\OpenTelemetry OpAMP Supervisor\config.yaml |
| Collector Config | C:\Program Files\OpenTelemetry OpAMP Supervisor\collector.yaml |
| Effective Config | C:\ProgramData\opampsupervisor\state\effective.yaml |
| Service | opampsupervisor (Windows Service) |
| Logs | Windows Event Log (Application) - Source: opampsupervisor |
Service Management
Regular Mode
## Check status
Get-Service otelcol-contrib
## View logs (Event Log)
Get-EventLog -LogName Application -Source otelcol-contrib -Newest 50
## Restart / Stop / Start
Restart-Service otelcol-contrib
Stop-Service otelcol-contrib
Start-Service otelcol-contrib
## Validate config
& "C:\Program Files\OpenTelemetry Collector\otelcol-contrib.exe" validate --config "C:\ProgramData\OpenTelemetry\Collector\config.yaml"
Supervisor Mode
## Check status
Get-Service opampsupervisor
## View logs
Get-EventLog -LogName Application -Source opampsupervisor -Newest 50 | Format-List
## Restart / Stop / Start
Restart-Service opampsupervisor
Stop-Service opampsupervisor
Start-Service opampsupervisor
## Check collector process (managed by supervisor)
Get-Process otelcol-contrib -ErrorAction SilentlyContinue
Viewing Configuration Files (Supervisor Mode)
## View effective config (actual config after merge with Fleet Management)
Get-Content "C:\ProgramData\opampsupervisor\state\effective.yaml"
Uninstall
Remove the collector while keeping configuration and logs (script is downloaded from GitHub and run):
$u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; & $f -Uninstall
Remove the collector and all data:
$u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; & $f -Uninstall -Purge
Note: For regular mode, uninstall uses the Windows MSI uninstaller. You can also uninstall manually via Windows Settings > Apps > "OpenTelemetry Collector".
Configuration Behavior
| Scenario | Action |
|---|---|
| Fresh install | Creates default empty config |
| Config exists | Preserves existing config |
With -Config | Uses provided config |
| Auto-upgrade | Preserves existing config |
| Supervisor mode | Config managed remotely via OpAMP |
Troubleshooting
Service Fails to Start
If the installer reports that the service failed to start, it will print recent errors from the Application Event Log. You can also run:
Common causes:
- IIS receiver in config but IIS not installed: Remove the
iisreceiver (and its use in pipelines) from your config if the machine does not have the IIS role, or install the Web Server (IIS) role. file_storageextension but storage directory missing: Your config referencesfile_storagebut the storage directory does not exist. Re-run the installer with-EnableDynamicIISParsingto createC:\ProgramData\OpenTelemetry\Collector\storageautomatically. The installer will detect and report this error specifically if the service fails to start.- Invalid config: Run:
& "C:\Program Files\OpenTelemetry Collector\otelcol-contrib.exe" validate --config "C:\ProgramData\OpenTelemetry\Collector\config.yaml" - Missing env var: Ensure
CORALOGIX_PRIVATE_KEYis set for the service (the installer sets it; if you reconfigure manually, set it in the service’s environment).
SSL/TLS Connection Error (Windows Server 2016 and older)
If you encounter "The request was aborted: Could not create SSL/TLS secure channel" when running the installation script, your system may be defaulting to TLS 1.0. GitHub requires TLS 1.2.
Optional fix for affected versions: On Windows Server 2016, Windows Server 2012 R2, or older Windows 10, enable TLS 1.2 before downloading:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; $env:CORALOGIX_PRIVATE_KEY='<your-private-key>'; & $f -Config 'C:\path\to\config.yaml'
Script Execution Policy
If you get execution policy errors:
Or run with bypass:
powershell -ExecutionPolicy Bypass -Command { $u='https://github.com/coralogix/telemetry-shippers/releases/latest/download/coralogix-otel-collector.ps1'; $f="$env:TEMP\coralogix-otel-collector.ps1"; Invoke-WebRequest -Uri $u -OutFile $f -UseBasicParsing; $env:CORALOGIX_PRIVATE_KEY='<your-private-key>'; & $f -Config 'C:\otel\config.yaml' }
Administrator Privileges
The script requires administrator privileges. Right-click PowerShell and choose Run as Administrator, then run the install command again.
Additional Resources
| Resource | Link |
|---|---|
| GitHub Repository | telemetry-shippers |
| OpenTelemetry Documentation | OpenTelemetry Collector |
Support
Need help?
Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.
Feel free to reach out to us via our in-app chat or by sending us an email at [email protected].