Warn at startup when explicitly configured filesystem paths are unusable
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- observability
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Go
- Stelle
- 13.8k
- Fork
- 2.7k
- Merge medio
- 1g 4h
- PR unite (30g)
- 7
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di prometheus/node_exporter
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
prometheus/node_exporter#3830 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
prometheus/node_exporter#3823 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
prometheus/node_exporter#3817 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
prometheus/node_exporter#3761 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
prometheus/node_exporter#1767 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di prometheus/node_exporter
Issue simili
-
bug docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
bug needs-acceptance wg/evaluation-quality
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
vllm-project/semantic-router#4424 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
NVIDIA/k8s-device-plugin#2076 ·
I maintainer di solito rispondono entro 1 giorno
-
Documentation help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
golang/go#81933 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno