Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

ZFS collector misparses dataset values that occur in the kstat field prefix

Đang mở Phù hợp với người mới
#3,761 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
go
Lĩnh vực
observability-sre

Hướng nghiên cứu

Bắt đầu với parsePoolObjsetFile, sử dụng trường hợp root dataset được báo cáo, trong đó giá trị là data và cũng xuất hiện trong dataset_name. Kiểm tra việc parsing và thêm hoặc cập nhật coverage cho label node_zfs_zpool_dataset_nwritten thu được; hoàn tất khi root dataset được gắn label dataset="data" trong khi việc parsing child dataset vẫn đúng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Host operating system

Linux 7.0.14-4-pve x86_64, OpenZFS 2.4.3

node_exporter version

Reproduced with both:

  • node_exporter 1.9.1
  • node_exporter 1.12.1

The same parsing code is present on the current default branch.

What did you do?

Created/read the root dataset of a pool named data. Its objset kstat contains
a valid string field:

dataset_name                    7    data

The child dataset data/vm-1101-disk-0 is parsed correctly, so this is specific
to a dataset value that occurs earlier in the complete input line.

What did you expect to see?
node_zfs_zpool_dataset_nwritten{dataset="data",zpool="data"} ...
What did you see instead?
node_zfs_zpool_dataset_nwritten{dataset="dataset_name                    7    data",zpool="data"} ...
Cause

parsePoolObjsetFile currently extracts the dataset with:

datasetName = line[strings.Index(line, parts[2]):]

For the value data, strings.Index matches the data at the beginning of
dataset_name, rather than the value in the third column. The resulting label
is therefore the entire input line. Joining parts[2:] would retain dataset
names containing spaces without searching the field-name/type prefix.

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của prometheus/node_exporter

Tất cả issue của prometheus/node_exporter

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.