Host agents: the collector on Windows Server

The OpenTelemetry Collector for Windows is installed from an MSI package and runs as a service. Use the configuration on the Linux page with the Windows paths below.

  1. Download otelcol-contrib_<version>_windows_x64.msi from the releases page and install it (msiexec /i otelcol-contrib_0.164.0_windows_x64.msi /qn). It installs to C:\Program Files\OpenTelemetry Collector\ and registers the service otelcol-contrib (starts automatically, runs as LocalSystem).
  2. Enrol the host as shown above; the files are in C:\ProgramData\netlens-agent\ (readable for SYSTEM and Administrators only, which is who the service runs as).
  3. Replace C:\Program Files\OpenTelemetry Collector\config.yaml with the configuration above, using these paths:

yaml tls: ca_file: C:\ProgramData\netlens-agent\ca.pem cert_file: C:\ProgramData\netlens-agent\agent.crt key_file: C:\ProgramData\netlens-agent\agent.key 4. Restart-Service otelcol-contrib. Errors are in the Windows Application event log (source otelcol-contrib). 5. Outbound: allow TCP 4318 from the server to Netlens. Nothing inbound is needed.

(The MSI’s service name, install folder and default configuration were read from the package itself; the collector was not run on Windows here. The PowerShell enrolment and renewal were run on PowerShell 7.4.)

Enrolling a Windows host is described on Set up Netlens and enrol a host.