Skip to content

nvme: Fix namespace parsing#821

Open
goll wants to merge 1 commit into
prometheus:masterfrom
goll:master
Open

nvme: Fix namespace parsing#821
goll wants to merge 1 commit into
prometheus:masterfrom
goll:master

Conversation

@goll

@goll goll commented Jun 9, 2026

Copy link
Copy Markdown

This PR fixes the namespace parsing bug introduced by #765 as the regex on L30 in class_nvme.go explicitly looks for nvme0c0n0.

Standard nvme devices will not have the c0 identifier, from what I gather that is only applicable in some multipath setups, it will just be nvme0n1 for example.

Noticed this following node_exporter upgrade that promised nvme metrics which were missing on all updated systems.

>> running all tests
go test -race  ./...
ok  	github.com/prometheus/procfs	1.132s
ok  	github.com/prometheus/procfs/bcache	1.017s
ok  	github.com/prometheus/procfs/bcachefs	1.013s
ok  	github.com/prometheus/procfs/blockdevice	1.020s
ok  	github.com/prometheus/procfs/btrfs	1.016s
?   	github.com/prometheus/procfs/ext4	[no test files]
ok  	github.com/prometheus/procfs/internal/fs	1.016s
ok  	github.com/prometheus/procfs/internal/util	(cached)
ok  	github.com/prometheus/procfs/iscsi	1.023s
ok  	github.com/prometheus/procfs/nfs	(cached)
ok  	github.com/prometheus/procfs/selinuxfs	1.015s
ok  	github.com/prometheus/procfs/sysfs	1.054s
ok  	github.com/prometheus/procfs/xfs	1.027s

Signed-off-by: goll <goll@users.noreply.github.com>
@goll

goll commented Jun 10, 2026

Copy link
Copy Markdown
Author

@discordianfish @SuperQ since you gentlemen handled #765

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant