Skip to content

Windows host monitoring with OpenTelemetry

The OpenTelemetry Collector’s hostmetrics receiver reads CPU, memory, disk, filesystem, network, and load statistics from a Windows host. The windowsperfcounters receiver adds Windows-native performance counters that hostmetrics does not expose. You run the Collector as a Windows service so it starts with the machine.

  • Windows Server 2016+ or Windows 10/11.
  • An elevated (Administrator) PowerShell session.
  • Your Osuite ingest endpoint and token.
  1. Install the Collector as a service. The contrib MSI installs the hostmetrics and windowsperfcounters receivers and registers a Windows service named otelcol-contrib. Run in an elevated PowerShell:

    Terminal window
    $OtelcolVersion = "0.156.0"
    Invoke-WebRequest -Uri "https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v$OtelcolVersion/otelcol-contrib_${OtelcolVersion}_windows_x64.msi" -OutFile "$env:TEMP\otelcol-contrib.msi"
    msiexec /i "$env:TEMP\otelcol-contrib.msi" /quiet
  2. Configure the receivers, processor, and exporter. Replace the contents of C:\Program Files\OpenTelemetry Collector Contrib\config.yaml with the following. Both receivers are wired into the metrics pipeline.

    receivers:
    hostmetrics:
    collection_interval: 30s
    scrapers:
    cpu:
    memory:
    disk:
    filesystem:
    network:
    load:
    windowsperfcounters:
    collection_interval: 30s
    metrics:
    system.processes.count:
    description: Number of processes on the host.
    unit: "{processes}"
    gauge:
    perfcounters:
    - object: System
    counters:
    - name: Processes
    metric: system.processes.count
    processors:
    resourcedetection:
    detectors: [env, system]
    system:
    hostname_sources: [os]
    batch:
    exporters:
    otlp/osuite:
    endpoint: ingest.<region>.osuite.io:443
    headers:
    x-osuite-ingest-token: <your-ingest-token>
    service:
    pipelines:
    metrics:
    receivers: [hostmetrics, windowsperfcounters]
    processors: [resourcedetection, batch]
    exporters: [otlp/osuite]
  3. Restart the service.

    Terminal window
    Restart-Service otelcol-contrib
    Get-Service otelcol-contrib

Confirm the service is running:

Terminal window
Get-Service otelcol-contrib

The Collector logs to the Windows Event Log under the otelcol-contrib source. Open Event Viewer → Windows Logs → Application to check for startup and OTLP export errors.

What you should see

Host metrics arrive within a minute — check Dashboards → Explore metrics for CPU, memory, disk, filesystem, network, and load metrics alongside the Windows process count. Build a host dashboard to plot utilization per host.

The hostmetrics receiver emits standard system.* metrics; the windowsperfcounters block above adds system.processes.count.

MetricDescription
system.cpu.timeCPU time by state (user, system, idle).
system.cpu.utilizationFraction of CPU time by state.
system.memory.usageMemory used, by state.
system.memory.utilizationFraction of memory used, by state.
system.disk.ioBytes read from and written to each disk.
system.disk.operationsRead and write operations per disk.
system.filesystem.usageBytes used and available per volume.
system.filesystem.utilizationFraction of each volume used.
system.network.ioBytes received and transmitted per interface.
system.cpu.load_average.1mOne-minute load average.
system.processes.countNumber of processes on the host (from windowsperfcounters).

If the install or service commands fail with an access error, confirm the PowerShell session is elevated (Run as Administrator). If a performance counter reports no data, verify the object and counter names against typeperf -q on the host — Windows counter names are localized and must match exactly.

No data in Osuite after a few minutes? Work through these checks.

  • Endpoint — confirm the exporter targets exactly ingest.<region>.osuite.io:443 for your region, over TLS.
  • Token — confirm the ingest header carries a valid <your-ingest-token> and has not been rotated.
  • Pipeline — confirm the signal you expect (traces, logs, or metrics) is wired into an active pipeline with the otlp/osuite exporter attached.
  • Export errors — check the application or Collector logs for OTLP export failures (auth, DNS, TLS, connection refused).
  • Network — confirm the host has outbound access to the ingest endpoint on port 443.
  • Timing — allow up to a minute for the first data to appear before assuming a failure.

Still stuck? Ask the Investigation Agent or contact support.