Skip to content

Linux host monitoring with OpenTelemetry

The OpenTelemetry Collector’s hostmetrics receiver reads CPU, memory, disk, filesystem, network, and load statistics directly from the host and exports them to Osuite over OTLP. You run the Collector as a systemd service so it starts on boot and restarts on failure.

  • A Linux host running a systemd-based distribution (Debian, Ubuntu, RHEL, CentOS, Fedora, Amazon Linux).
  • root or sudo access to install a package and manage the service.
  • Your Osuite ingest endpoint and token.
  1. Install the Collector as a service. Install the contrib distribution, which includes the hostmetrics receiver and the resourcedetection processor. The package registers a systemd service named otelcol-contrib and writes a default config to /etc/otelcol-contrib/config.yaml.

    Terminal window
    OTELCOL_VERSION="0.156.0"
    curl -fsSLO https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v${OTELCOL_VERSION}/otelcol-contrib_${OTELCOL_VERSION}_linux_amd64.deb
    sudo dpkg -i otelcol-contrib_${OTELCOL_VERSION}_linux_amd64.deb

    On 64-bit ARM hosts, replace amd64 with arm64 in the file name.

  2. Configure the receiver, processor, and exporter. Replace the contents of /etc/otelcol-contrib/config.yaml with the following. Every scraper listed here is wired into the metrics pipeline, and the resourcedetection processor attaches host identity so each metric is attributable to the machine that produced it.

    receivers:
    hostmetrics:
    collection_interval: 30s
    scrapers:
    cpu:
    memory:
    disk:
    filesystem:
    network:
    load:
    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]
    processors: [resourcedetection, batch]
    exporters: [otlp/osuite]
  3. Restart the service.

    Terminal window
    sudo systemctl restart otelcol-contrib
    sudo systemctl status otelcol-contrib

Confirm the service is running and exporting:

Terminal window
sudo systemctl status otelcol-contrib
sudo journalctl -u otelcol-contrib -f

A healthy Collector logs Everything is ready. Begin running and processing data. and shows no 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. Build a host dashboard to plot utilization per host.

The hostmetrics receiver emits standard system.* metrics. The most useful, by scraper:

MetricDescription
system.cpu.timeCPU time by state (user, system, idle, wait).
system.cpu.utilizationFraction of CPU time by state.
system.memory.usageMemory used, by state (used, free, cached, buffered).
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 mounted filesystem.
system.filesystem.utilizationFraction of each filesystem used.
system.network.ioBytes received and transmitted per interface.
system.network.packetsPackets received and transmitted per interface.
system.cpu.load_average.1mOne-minute load average.
system.cpu.load_average.5mFive-minute load average.
system.cpu.load_average.15mFifteen-minute load average.

If a scraper reports no data, confirm the Collector’s service user can read the source: the filesystem and disk scrapers need read access to /proc and /sys, which the packaged otelcol-contrib service has by default. If the download 404s, check that the version tag exists in the Collector releases and that the architecture in the file name matches the host.

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.