packages: nagios-plugin-check_raid/check_raid - see raid state from proc, m...

glen glen at pld-linux.org
Thu Sep 10 22:19:45 CEST 2009


Author: glen                         Date: Thu Sep 10 20:19:45 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- see raid state from proc, make missing tool a critical error

---- Files affected:
packages/nagios-plugin-check_raid:
   check_raid (1.34 -> 1.35) 

---- Diffs:

================================================================
Index: packages/nagios-plugin-check_raid/check_raid
diff -u packages/nagios-plugin-check_raid/check_raid:1.34 packages/nagios-plugin-check_raid/check_raid:1.35
--- packages/nagios-plugin-check_raid/check_raid:1.34	Thu Sep 10 21:40:26 2009
+++ packages/nagios-plugin-check_raid/check_raid	Thu Sep 10 22:19:40 2009
@@ -213,6 +213,12 @@
 }
 
 sub check_aaccli {
+	unless ($aaccli) {
+		$message .= "aac:aaccli program not found ";
+		$status = $ERRORS{CRITICAL};
+		return;
+	}
+
 	my @CMD = $aaccli;
 	unshift(@CMD, $sudo) if $> and $sudo;
 
@@ -285,6 +291,12 @@
 }
 
 sub check_mpt {
+	unless ($mpt_status) {
+		$message .= "mpt:mpt-status program not found ";
+		$status = $ERRORS{CRITICAL};
+		return;
+	}
+
 	my @CMD = $mpt_status;
 	unshift(@CMD, $sudo) if $> and $sudo;
 
@@ -536,10 +548,10 @@
 check_gdth if -d "/proc/scsi/gdth";                     # Linux Gdth RAID
 check_megaide if -d "/proc/megaide";                    # MegaIDE RAID controller
 check_mdstat if -f "/proc/mdstat";                      # Linux LVM
-check_mpt if $mpt_status and -d "/proc/mpt";            # LSILogic MPT ServeRAID
+check_mpt -d "/proc/mpt";                               # LSILogic MPT ServeRAID
 check_dpt_i2o if -d "/proc/scsi/dpt_i2o";               # i2o RAID
 check_megaraid if -d "/proc/megaraid";                  # MegaRAID
-check_aaccli if $aaccli and -d "/proc/scsi/aacraid";    # Adaptec ServeRAID
+check_aaccli -d "/proc/scsi/aacraid";                   # Adaptec ServeRAID
 check_afacli if $afacli;                                # Adaptec AACRAID
 check_lsraid if $lsraid;                                # Linux, software RAID
 check_metastat if $metastat;                            # Solaris, software RAID
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-plugin-check_raid/check_raid?r1=1.34&r2=1.35&f=u



More information about the pld-cvs-commit mailing list