1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

nvme: use non-capturing group for 0x

fixes issues on systems where namespace is not yet prefixed by 0x
This commit is contained in:
Andreas Perhab 2024-04-24 12:46:17 +02:00
parent f165c625bf
commit 06c8186bd7

View file

@ -89,7 +89,7 @@ None known.
=head1 VERSION =head1 VERSION
1.1 1.2
=head1 AUTHOR =head1 AUTHOR
@ -176,7 +176,7 @@ sub nvme_list {
} elsif (m:^Node\s+Generic\s+SN\s+Model\s+Namespace\s+Usage\s+:) { } elsif (m:^Node\s+Generic\s+SN\s+Model\s+Namespace\s+Usage\s+:) {
# version 2 header # version 2 header
++$recognised_output; ++$recognised_output;
} elsif (m:^(/\S+)\s+(/\S+)\s+(\S+)\s+(\S.*\S)\s{3,}((0x)?\d+)\s+(\S+\s+.B)\s+/\s+(\S+\s+.B):) { } elsif (m|^(/\S+)\s+(/\S+)\s+(\S+)\s+(\S.*\S)\s{3,}((?:0x)?\d+)\s+(\S+\s+.B)\s+/\s+(\S+\s+.B)|) {
# version 2 data (first 2 columns start with /) # version 2 data (first 2 columns start with /)
$devices{'SN_'.$3} = { $devices{'SN_'.$3} = {
device => $1, device => $1,