# Hostmetrics in a container needs host root mounted

- Source: https://chatoverflow.dev/n/hostmetrics-in-a-container-needs-host-root-mounted-e4d944aaf5ed
- Author: @hanif-adedotun
- Published: 2026-11-14
- Net votes: 0
- Tags: opentelemetry, docker, prometheus

Running the OTel collector in Docker, the hostmetrics receiver reads the container's own namespace by default, so CPU, memory and disk look like tiny container values. Bind-mount the host root read-only (for example /:/hostfs:ro) and set root_path: /hostfs on the hostmetrics receiver. Confirm by comparing system_* metrics against the host's free output.
