mirror of
https://github.com/thomas-krenn/check_lsi_raid.git
synced 2025-07-14 03:41:50 +02:00
Add "--noconsistencyok" to skip consistency check of LDs
This commit is contained in:
@ -46,6 +46,7 @@ our $CV_TEMP_CRITICAL = 85;
|
|||||||
our ($IGNERR_M, $IGNERR_O, $IGNERR_P, $IGNERR_S, $IGNERR_B) = (0, 0, 0, 0, 0);
|
our ($IGNERR_M, $IGNERR_O, $IGNERR_P, $IGNERR_S, $IGNERR_B) = (0, 0, 0, 0, 0);
|
||||||
our $NOENCLOSURES = 0;
|
our $NOENCLOSURES = 0;
|
||||||
our $NOWRITEBACKOK = 0;
|
our $NOWRITEBACKOK = 0;
|
||||||
|
our $NOCONSISTENCYOK = 0;
|
||||||
our $CONTROLLER = 0;
|
our $CONTROLLER = 0;
|
||||||
|
|
||||||
use constant {
|
use constant {
|
||||||
@ -142,6 +143,9 @@ sub displayUsage {
|
|||||||
print " [ --nowritebackok <0/1> ]
|
print " [ --nowritebackok <0/1> ]
|
||||||
Specifies if a WriteThrough Cache configuration is ok or not. 0 means WriteThrough is
|
Specifies if a WriteThrough Cache configuration is ok or not. 0 means WriteThrough is
|
||||||
considered Critical (default), 1 states WriteThrough is ok.\n";
|
considered Critical (default), 1 states WriteThrough is ok.\n";
|
||||||
|
print " [ --noconsistencyok <0/1> ]
|
||||||
|
Specifies if the consistency of logical devices should be checked. 0 means consistency
|
||||||
|
should be checked (default), 1 means not.\n";
|
||||||
print " [ --nosudo ]
|
print " [ --nosudo ]
|
||||||
Turn off using sudo.\n";
|
Turn off using sudo.\n";
|
||||||
print " [ --nocleanlogs ]
|
print " [ --nocleanlogs ]
|
||||||
@ -463,11 +467,13 @@ sub getLDStatus{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(exists($LD->{'Consist'})){
|
if(!$NOCONSISTENCYOK){
|
||||||
if($LD->{'Consist'} ne 'Yes' && $LD->{'TYPE'} ne 'Cac1'){
|
if(exists($LD->{'Consist'})){
|
||||||
$status = 'Warning' unless $status eq 'Critical';
|
if($LD->{'Consist'} ne 'Yes' && $LD->{'TYPE'} ne 'Cac1'){
|
||||||
push @{$statusLevel_a[1]}, $LD->{'ld'}.'_Consist';
|
$status = 'Warning' unless $status eq 'Critical';
|
||||||
$statusLevel_a[3]->{$LD->{'ld'}.'_Consist'} = $LD->{'Consist'};
|
push @{$statusLevel_a[1]}, $LD->{'ld'}.'_Consist';
|
||||||
|
$statusLevel_a[3]->{$LD->{'ld'}.'_Consist'} = $LD->{'Consist'};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(exists($LD->{'init'})){
|
if(exists($LD->{'init'})){
|
||||||
@ -1305,6 +1311,7 @@ MAIN: {
|
|||||||
'b|BBU=i' => \$bbu,
|
'b|BBU=i' => \$bbu,
|
||||||
'noenclosures=i' => \$NOENCLOSURES,
|
'noenclosures=i' => \$NOENCLOSURES,
|
||||||
'nowritebackok=i' => \$NOWRITEBACKOK,
|
'nowritebackok=i' => \$NOWRITEBACKOK,
|
||||||
|
'noconsistencyok=i' => \$NOCONSISTENCYOK,
|
||||||
'nosudo' => \$noSudo,
|
'nosudo' => \$noSudo,
|
||||||
'nocleanlogs' => \$noCleanlogs
|
'nocleanlogs' => \$noCleanlogs
|
||||||
))){
|
))){
|
||||||
|
Reference in New Issue
Block a user