Warn at startup when explicitly configured filesystem paths are unusable
Los mantenedores suelen responder en 2 días
@wangyusheng1985 ya está trabajando en esto.
Desde el 30/9/2026.
- #3833 de @wangyusheng1985 — abierto
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- observability
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 13.9k
- Forks
- 2.7k
- Merge medio
- 2 d 10 h
- PR fusionados (30 d)
- 15
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de prometheus/node_exporter
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
prometheus/node_exporter#3850 ·
Los mantenedores suelen responder en 2 días
-
node-mixin: Adjust `memory used` Dashboard to use `MemAvailable`Quizá libre de nuevo @ojasks la tomó hace 27 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
prometheus/node_exporter#3830 · 3 comentarios · 1 reacción ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
prometheus/node_exporter#3823 ·
Los mantenedores suelen responder en 2 días
-
Fibre Channel collector panics when sysfs statistics counters are missingPosiblemente ocupada @itjustnathan la tomó hace 45 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
prometheus/node_exporter#3817 ·
Los mantenedores suelen responder en 2 días
-
ZFS collector misparses dataset values that occur in the kstat field prefixPosiblemente ocupada @vigneshakaviki la tomó hace 86 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
prometheus/node_exporter#3761 ·
Los mantenedores suelen responder en 2 días
Todos los issues de prometheus/node_exporter
Issues similares
-
fix(handlers): explicitly set Content-Type header in static Index handlerPosiblemente ocupada @kage-zero la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Quick Open: restore dependency-directory exclusions in filesystem fallbackPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
eugenioenko/ttt#1206 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
open-policy-agent/opa#9426 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
rorkai/App-Store-Connect-CLI#3192 ·
Los mantenedores suelen responder en 1 día
-
t:urlDecodeUni does not map U+3002 and U+FF61 to a dot, unlike ModSecurityPosiblemente ocupada @fzipi la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día