The sas2ircu plugin claims hot spares are an error:
DEBUG EXEC: /sbin/dmsetup status --noflush at /usr/local/lib/nagios/plugins/check_raid line 487.
DEBUG EXEC: /usr/sbin/sas2ircu LIST at /usr/local/lib/nagios/plugins/check_raid line 487.
DEBUG EXEC: /usr/sbin/sas2ircu 0 STATUS at /usr/local/lib/nagios/plugins/check_raid line 487.
DEBUG EXEC: /usr/sbin/sas2ircu 0 DISPLAY at /usr/local/lib/nagios/plugins/check_raid line 487.
CRITICAL: dm:[No devices to check]; sas2ircu:[ctrl #0: 1 Vols: Optimal: 4 Drives: Hot Spare (HSP): ERROR:Ctrl0:Enc1:Slot2:Hot Spare (HSP) ERROR:Ctrl0:Enc1:Slot3:Hot Spare (HSP):]
Actually this array is fine and just has two hot spares so the status should be 'OK'.
The following patch treats the status 'Hot Spare' as equivalent to 'Optimal' and 'Ready':
diff --git a/lib/App/Monitoring/Plugin/CheckRaid/Plugins/sas2ircu.pm b/lib/App/Monitoring/Plugin/CheckRaid/Plugins/sas2ircu.pm
index e551fa8..0ce63f2 100644
--- a/lib/App/Monitoring/Plugin/CheckRaid/Plugins/sas2ircu.pm
+++ b/lib/App/Monitoring/Plugin/CheckRaid/Plugins/sas2ircu.pm
@@ -217,7 +217,7 @@ sub check {
#if ($numslots == 10 ) { $state='FREDFISH';}
#when we get a state, test on it and report it..
- if ($state =~ /Optimal|Ready/) {
+ if ($state =~ /Optimal|Ready|Hot Spare/) {
#do nothing at the moment.
} else {
$this->critical;
Hi,
The sas2ircu plugin claims hot spares are an error:
Actually this array is fine and just has two hot spares so the status should be 'OK'.
The following patch treats the status 'Hot Spare' as equivalent to 'Optimal' and 'Ready':