Warn at startup when explicitly configured filesystem paths are unusable
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- observability
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Go
- Star
- 13.8k
- Fork
- 2.7k
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của prometheus/node_exporter
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
prometheus/node_exporter#3830 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
prometheus/node_exporter#3823 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
prometheus/node_exporter#3817 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
prometheus/node_exporter#3761 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
prometheus/node_exporter#1767 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của prometheus/node_exporter
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
NVIDIA/k8s-device-plugin#2076 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/release kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
kubernetes-sigs/kueue#16455 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày