Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sas2ircu detects hot spares as critical #159

Open
tiger-jmw opened this issue Dec 14, 2016 · 2 comments
Open

sas2ircu detects hot spares as critical #159

tiger-jmw opened this issue Dec 14, 2016 · 2 comments

Comments

@tiger-jmw
Copy link

Hi,

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;
tiger-jmw added a commit to tigercomputing/nagios-plugin-check_raid that referenced this issue Dec 14, 2016
@tiger-jmw
Copy link
Author

#160

@glensc
Copy link
Owner

glensc commented Dec 14, 2016

Neither of the tickets provide required output of commands ran from your system. See CONTRIBUTING.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants