Configure the OpenTelemetry Collector hostmetrics receiver to collect CPU, memory, disk, filesystem, and network metrics from the host

domain: github.com/open-telemetry/opentelemetry-collector-contrib · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Add a hostmetrics receiver block under receivers with collection_interval (default 1m) and initial_delay (default 1s), e.g. hostmetrics: { collection_interval: 30s }.
  2. Under scrapers, enable the desired categories by adding their keys (empty or with options): cpu, memory, disk, filesystem, network — plus load, paging, processes, process, system, or nfs where OS-supported.
  3. For filesystem, use include_devices/exclude_devices, include_fs_types/exclude_fs_types, and include_mount_points/exclude_mount_points blocks (each with match_type: strict or regexp) to scope which filesystems are scraped, and set include_virtual_filesystems: true if needed.
  4. For disk and network, use include/exclude blocks with devices or interfaces plus match_type to filter which devices/NICs are scraped.
  5. Add the receiver to a metrics pipeline under service.pipelines.metrics.receivers.
  6. When running inside a container, bind-mount the host filesystem (e.g. docker run -v /:/hostfs) and set root_path: /hostfs so the scrapers read host paths instead of the container's own; all hostmetrics instances on the same Collector must use the same root_path.

Known gotchas

Related routes

Configure OpenTelemetry resource detection processors in the Collector to automatically populate cloud and Kubernetes resource attributes
opentelemetry.io · 5 steps · unrated
Configure an OpenTelemetry Collector pipeline with receivers, processors, and exporters
opentelemetry.io · 6 steps · unrated
Set up the OpenTelemetry eBPF collector to capture network-level telemetry
opentelemetry.io · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans