Warn at startup when explicitly configured filesystem paths are unusable
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
Start by locating startup handling for the --path.rootfs, --path.procfs, and --path.sysfs flags, then trace how explicitly configured paths are stored and accessed. Add lightweight warnings for configured paths that are missing, non-directories, or inaccessible while preserving startup, and verify that default paths and unusual environments retain their current behavior.
索引モデルが issue の本文から書いたものです。
説明
Containerized node_exporter deployments often depend on bind-mounted host filesystems together with flags such as:
--path.rootfs=/host
--path.procfs=/host/proc
--path.sysfs=/host/sys
A small mistake in those mounts can be harder to diagnose than it needs to be.
For example, if /host/proc is missing, mounted incorrectly, or not accessible inside the container, node_exporter can still start successfully. The problem then shows up later through collector errors, missing metrics, or values coming from the container namespace instead of the host.
That makes a simple deployment mistake look like a metrics or collector problem.
I think it would be useful to validate filesystem paths that were explicitly overridden and emit a warning at startup when one is clearly unusable.
The validation could stay intentionally lightweight:
- path does not exist
- path is not a directory
- path cannot be accessed by the exporter
For procfs and sysfs, it may also be possible to cheaply detect paths that clearly do not point to the expected filesystem, as long as that doesn't introduce assumptions about files required by individual collectors.
I would keep this as a warning rather than a startup error. A partially working exporter can still be useful, and unusual environments shouldn't be rejected just because they don't look like a typical Linux host.
For example, starting with:
--path.procfs=/host/proc
when /host/proc is not actually mounted could produce a startup message along the lines of:
level=warn msg="Configured procfs path is not usable" path=/host/proc
The exporter could then continue with its current behavior.
I'd also limit the check to paths explicitly set by the user. That keeps the existing defaults untouched and makes the warning directly actionable: if someone configured a custom host path, they get an early indication that the path doesn't look usable.
The goal isn't to fully validate a host mount or predict every collector failure. It's just to catch obvious configuration mistakes at startup, before they turn into confusing scrape-time behavior.
- 主要言語
- Go
- スター
- 13.9k
- フォーク
- 2.7k
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 20
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
prometheus/node_exporter のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
prometheus/node_exporter#3850 ·
メンテナーはふだん 1 日以内に返信
-
node-mixin: Adjust `memory used` Dashboard to use `MemAvailable`再び着手できるかも @ojasks が 32 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
prometheus/node_exporter#3830 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
prometheus/node_exporter#3823 ·
メンテナーはふだん 1 日以内に返信
-
Fibre Channel collector panics when sysfs statistics counters are missing対応中かも @itjustnathan が 49 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
prometheus/node_exporter#3817 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ZFS collector misparses dataset values that occur in the kstat field prefix対応中かも @vigneshakaviki が 90 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
prometheus/node_exporter#3761 ·
メンテナーはふだん 1 日以内に返信
prometheus/node_exporter の issue をすべて見る
似ている issue
-
area:recipes event:contribfest format:human-first source:agent status:needs-triage type:recipe
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
cadence-workflow/cadence-ai-samples#140 ·
メンテナーはふだん 1 日以内に返信
-
ux
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
evcc-io/evcc#35605 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
project-setup
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
bug report
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
nightgauge/nightgauge#2732 ·
メンテナーはふだん 1 日以内に返信