Author: glen Date: Thu Sep 10 09:32:12 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- add check_dpt_i2o via /proc
---- Files affected:
packages/nagios-plugin-check_raid:
check_raid (1.27 -> 1.28)
---- Diffs:
================================================================
Index: packages/nagios-plugin-check_raid/check_raid
diff -u packages/nagios-plugin-check_raid/check_raid:1.27
packages/nagios-plugin-check_raid/check_raid:1.28
--- packages/nagios-plugin-check_raid/check_raid:1.27 Thu Sep 10 11:10:53 2009
+++ packages/nagios-plugin-check_raid/check_raid Thu Sep 10 11:32:07 2009
@@ -363,6 +363,23 @@
}
}
+sub check_dpt_i2o {
+ for my $file (</proc/scsi/dpt_i2o/*>) {
+ open my $fh, '<', $file or return;
+ my ($controller) = $file =~ m{([^/]+$)};
+ while (<$fh>) {
+ chomp;
+ if (my ($c, $t, $l, $status) = m/TID=\d+,
\(Channel=(\d+), Target=(\d+), Lun=(\d+)\) \((\S+)\)/) {
+ if ($status ne "online") {
+ $status = $ERRORS{CRITICAL} unless
$status;
+ }
+ $message .= "dpt_i2o:$c,$t,$l:$status ";
+ }
+ }
+ close($fh);
+ }
+}
+
sub find_prog {
my $prog = shift;
@@ -479,6 +496,7 @@
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_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_afacli if $afacli; # Adaptec AACRAID
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-plugin-check_raid/check_raid?r1=1.27&r2=1.28&f=u
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit