From d0201be2d29a479390e2d965f66f82aeab325493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georg=20Sch=C3=B6nberger?= Date: Mon, 20 Oct 2014 12:30:47 +0200 Subject: [PATCH] Print a warning if foreign DG detected --- check_lsi_raid | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/check_lsi_raid b/check_lsi_raid index cb062e9..e2fbe04 100755 --- a/check_lsi_raid +++ b/check_lsi_raid @@ -491,7 +491,7 @@ sub getPhysicalDevices{ } if(defined($currBlock)){ # If a drive is not in a group, a - is at the DG column - if($line =~ /^\d+\:\d+\s+\d+\s+\w+\s+[0-9-]+.*/){ + if($line =~ /^\d+\:\d+\s+\d+\s+\w+\s+[0-9-F]+.*/){ @splittedLine = map { s/^\s*//; s/\s*$//; $_; } split(/\s+/,$line); # The current block is the c0/e252/s0 name $line_ref->{'pd'} = $currBlock; @@ -613,6 +613,12 @@ sub getPDStatus{ push @{$statusLevel_a[1]}, $PD->{'pd'}.'_SMART_flag'; } } + if(exists($PD->{'DG'})){ + if($PD->{'eq'} eq 'F'){ + $status = 'Warning'; + push @{$statusLevel_a[1]}, $PD->{'pd'}.'_DG'; + } + } if(exists($PD->{'Drive Temperature'})){ my $temp = $PD->{'Drive Temperature'}; if($temp ne 'N/A' && $temp ne '0C (32.00 F)'){