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.
Prerequisites
Section titled “Prerequisites”- A Linux host running a
systemd-based distribution (Debian, Ubuntu, RHEL, CentOS, Fedora, Amazon Linux). rootorsudoaccess to install a package and manage the service.- Your Osuite ingest endpoint and token.
Set up the Collector
Section titled “Set up the Collector”-
Install the Collector as a service. Install the
contribdistribution, which includes thehostmetricsreceiver and theresourcedetectionprocessor. The package registers asystemdservice namedotelcol-contriband 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.debsudo dpkg -i otelcol-contrib_${OTELCOL_VERSION}_linux_amd64.debTerminal 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.rpmsudo rpm -ivh otelcol-contrib_${OTELCOL_VERSION}_linux_amd64.rpmOn 64-bit ARM hosts, replace
amd64witharm64in the file name. -
Configure the receiver, processor, and exporter. Replace the contents of
/etc/otelcol-contrib/config.yamlwith the following. Every scraper listed here is wired into themetricspipeline, and theresourcedetectionprocessor attaches host identity so each metric is attributable to the machine that produced it.receivers:hostmetrics:collection_interval: 30sscrapers:cpu:memory:disk:filesystem:network:load:processors:resourcedetection:detectors: [env, system]system:hostname_sources: [os]batch:exporters:otlp/osuite:endpoint: ingest.<region>.osuite.io:443headers:x-osuite-ingest-token: <your-ingest-token>service:pipelines:metrics:receivers: [hostmetrics]processors: [resourcedetection, batch]exporters: [otlp/osuite] -
Restart the service.
Terminal window sudo systemctl restart otelcol-contribsudo systemctl status otelcol-contrib
Validate
Section titled “Validate”Confirm the service is running and exporting:
sudo systemctl status otelcol-contribsudo journalctl -u otelcol-contrib -fA healthy Collector logs Everything is ready. Begin running and processing data. and shows no OTLP export errors.
Verify in Osuite
Section titled “Verify in Osuite”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.
Data collected
Section titled “Data collected”The hostmetrics receiver emits standard system.* metrics. The most useful, by scraper:
| Metric | Description |
|---|---|
system.cpu.time | CPU time by state (user, system, idle, wait). |
system.cpu.utilization | Fraction of CPU time by state. |
system.memory.usage | Memory used, by state (used, free, cached, buffered). |
system.memory.utilization | Fraction of memory used, by state. |
system.disk.io | Bytes read from and written to each disk. |
system.disk.operations | Read and write operations per disk. |
system.filesystem.usage | Bytes used and available per mounted filesystem. |
system.filesystem.utilization | Fraction of each filesystem used. |
system.network.io | Bytes received and transmitted per interface. |
system.network.packets | Packets received and transmitted per interface. |
system.cpu.load_average.1m | One-minute load average. |
system.cpu.load_average.5m | Five-minute load average. |
system.cpu.load_average.15m | Fifteen-minute load average. |
Troubleshooting
Section titled “Troubleshooting”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:443for 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/osuiteexporter 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.
Next steps
Section titled “Next steps”- Windows host monitoring — the same recipe for Windows hosts
- Docker container metrics — per-container metrics from the same host
- Dashboards — build host dashboards from the collected metrics
- Alerts — alert on host CPU, memory, and disk thresholds