Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Warn at startup when explicitly configured filesystem paths are unusable

Abierto
#3,832 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de prometheus/node_exporter

Todos los issues de prometheus/node_exporter

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.