# HG changeset patch # User Matthias Förste # Date 1483959402 -3600 # Node ID 738d4b8f3a0f5bd0db1ec0e7aa41d76bef984e88 # Parent c8bcf8c2480543dd153573e133dae8b8e9eb45da fixed match for resource numbers with more than one digit diff -r c8bcf8c24805 -r 738d4b8f3a0f check_drbd.pl --- a/check_drbd.pl Fri Aug 08 15:10:30 2014 +0200 +++ b/check_drbd.pl Mon Jan 09 11:56:42 2017 +0100 @@ -65,7 +65,7 @@ my $r; while () { chomp; - if (/^.*(?(?\d+):\s+cs:(?\S+)\s+(?:st|ro):(?\S+)\s+(?:ds|ld):(?\S+))/) { + if (/^\s*(?(?\d+):\s+cs:(?\S+)\s+(?:st|ro):(?\S+)\s+(?:ds|ld):(?\S+))/) { $r = $+{resource}; $drbd{$r} = { line => $+{line},