Skip to main content

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 local configuration mode (configuration file provided locally) and supervisor mode (remote configuration 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
Tip

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​

VariableRequiredDescription
CORALOGIX_PRIVATE_KEYYesYour Coralogix Send-Your-Data API key
CORALOGIX_DOMAINSupervisor mode onlyYour Coralogix domain

Automatically Set Variables​

The installer automatically sets these environment variables for the collector service:

VariableDefaultDescription
OTEL_MEMORY_LIMIT_MIB512Memory limit in MiB (set via -MemoryLimit parameter)
OTEL_LISTEN_INTERFACE127.0.0.1Network 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_storage extension (e.g. for checkpoint state), you must also pass -EnableDynamicIISParsing so 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

With Fleet Management Selector Attributes​

$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 -SupervisorOpampAttribute 'fleet.test.id=fleet-demo','deployment.environment=staging'

-SupervisorOpampAttribute is repeatable and adds non-identifying agent attributes for Fleet Management selectors. Duplicate keys and built-in service.name or cx.agent.type overrides fail. It cannot be combined with -SupervisorOpampConfig.

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​

ParameterDescription
-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)
-SupervisorInstall 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
-SupervisorOpampAttribute <key=value>Add repeatable Supervisor OpAMP non-identifying agent attribute
-EnableDynamicIISParsingEnable dynamic IIS log parsing with header-based field detection
-UninstallRemove the collector (keeps config)
-Uninstall -PurgeRemove the collector and all configuration
-HelpShow help message

Installation Locations​

Local Configuration Mode​

ComponentLocation
BinaryC:\Program Files\OpenTelemetry Collector\otelcol-contrib.exe
ConfigurationC:\ProgramData\OpenTelemetry\Collector\config.yaml
Serviceotelcol-contrib (Windows Service)
LogsWindows Event Log (Application)

Supervisor Mode​

ComponentLocation
Collector BinaryC:\Program Files\OpenTelemetry Collector\otelcol-contrib.exe
Supervisor BinaryC:\Program Files\OpenTelemetry OpAMP Supervisor\opampsupervisor.exe
Supervisor ConfigC:\Program Files\OpenTelemetry OpAMP Supervisor\config.yaml
Collector ConfigC:\Program Files\OpenTelemetry OpAMP Supervisor\collector.yaml
Effective ConfigC:\ProgramData\opampsupervisor\state\effective.yaml
Serviceopampsupervisor (Windows Service)
LogsWindows Event Log (Application) - Source: opampsupervisor

Service Management​

Local Configuration 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​

ScenarioAction
Fresh installCreates default empty config
Config existsPreserves existing config
With -ConfigUses provided config
Auto-upgradePreserves existing config
Supervisor modeConfig 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:

Get-EventLog -LogName Application -Source otelcol-contrib -Newest 20

Common causes:

  • IIS receiver in config but IIS not installed: Remove the iis receiver (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_storage extension but storage directory missing: Your config references file_storage but the storage directory does not exist. Re-run the installer with -EnableDynamicIISParsing to create C:\ProgramData\OpenTelemetry\Collector\storage automatically. 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_KEY is 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:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

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' }

Process Not Found​

If Get-Process otelcol-contrib returns "Cannot find a process":

  1. Check if the service is running:

    Get-Service otelcol-contrib
    # or for supervisor mode:
    Get-Service opampsupervisor
  2. Check why it failed:

    # For local configuration mode
    Get-EventLog -LogName Application -Source otelcol-contrib -Newest 20

    # For supervisor mode
    Get-EventLog -LogName Application -Source opampsupervisor -Newest 50 | Format-List
  3. Try starting the service manually:

    Start-Service otelcol-contrib
    Get-Service otelcol-contrib

Administrator Privileges​

The script requires administrator privileges. Right-click PowerShell and choose Run as Administrator, then run the install command again.

Additional Resources​

ResourceLink
GitHub Repositorytelemetry-shippers
OpenTelemetry DocumentationOpenTelemetry 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].

Last updated on