[Pkg-nagios-devel] Bug#891830: Fix for check_raid mdstat fails to parse 'sdd2[3](W)(S)'

debbugs at aplu.fr debbugs at aplu.fr
Tue Dec 8 20:10:21 GMT 2020


Dear maintainer, hi everyone,

I got the same issue and I've made a simple fix on the regex, instead of
"?" which is valid for "0" or "1" occurence, I used "*".

It seems to work well on my side, maybe you could try?

I'm using the latest version available on Debian 10.

Here is my patch:

Regards,

Aymeric.


--- /usr/lib/nagios/plugins/check_raid  2020-12-08 21:05:25.067753313 +0100
+++ /tmp/check_raid     2020-12-08 21:05:20.219799196 +0100
@@ -3558,7 +3558,7 @@
                        my $re = qr{^
                                (\S+)           # devname
                                (?:\[(\d+)\])   # desc_nr
-                               (?:\((.)\))?    # flags: (W|F|S) -
WriteMostly, Faulty, Spare
+                               (?:\((.)\))*    # flags: (W|F|S) -
WriteMostly, Faulty, Spare
                        $}x;
                        my @disks = ();
                        my $personality;


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-devel/attachments/20201208/cf66e926/attachment.html>


More information about the Pkg-nagios-devel mailing list