Skip to content

feat(host_metrics source): add ROOTFS_ROOT support#25880

Open
fpytloun wants to merge 2 commits into
vectordotdev:masterfrom
fpytloun:feat/host-metrics-rootfs-root
Open

feat(host_metrics source): add ROOTFS_ROOT support#25880
fpytloun wants to merge 2 commits into
vectordotdev:masterfrom
fpytloun:feat/host-metrics-rootfs-root

Conversation

@fpytloun

@fpytloun fpytloun commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds documented Unix-only ROOTFS_ROOT support to the host_metrics filesystem collector. When set, Vector resolves filesystem capacity and inode reads through the mounted host root while preserving logical mountpoint labels.

The existing PROCFS_ROOT and SYSFS_ROOT startup handling now also treats empty values as unset. Filesystem usage errors include both logical and resolved mount paths.

Vector configuration

sources:
  host:
    type: host_metrics
    collectors: [filesystem]

Run with ROOTFS_ROOT=/mnt/host and mount the host root read-only at /mnt/host.

How did you test this PR?

  • cargo test --no-default-features --features sources-host_metrics --lib sources::host_metrics
  • cargo fmt --all -- --check
  • make check-generated-docs
  • make check-changelog-fragments

Focused Clippy was attempted but is blocked by a pre-existing lint under the locally installed Rust 1.96 toolchain: src/config/loading/secret.rs:151 triggers clippy::manual_option_zip. The repository pins Rust 1.95.

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. A changelog fragment is included.
  • No. A maintainer will apply the no-changelog label to this PR.

References

  • Related: containerized host filesystem metrics

@fpytloun
fpytloun requested review from a team as code owners July 17, 2026 07:46
@github-actions github-actions Bot added docs review on hold The documentation team reviews PRs only after a PR is approved by the COSE team. domain: sources Anything related to the Vector's sources domain: external docs Anything related to Vector's external, public documentation labels Jul 17, 2026
@fpytloun

Copy link
Copy Markdown
Contributor Author

@pront Hello, can this small change be merged? It solves use-case when vector is running in Docker container with rootfs mounted on eg. /hostfs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs review on hold The documentation team reviews PRs only after a PR is approved by the COSE team. domain: external docs Anything related to Vector's external, public documentation domain: sources Anything related to the Vector's sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant