packages: nagios-plugin-check_raid/check_raid - add temperature checking

glen glen at pld-linux.org
Sun Oct 18 13:29:33 CEST 2009


Author: glen                         Date: Sun Oct 18 11:29:32 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- add temperature checking

---- Files affected:
packages/nagios-plugin-check_raid:
   check_raid (1.60 -> 1.61) 

---- Diffs:

================================================================
Index: packages/nagios-plugin-check_raid/check_raid
diff -u packages/nagios-plugin-check_raid/check_raid:1.60 packages/nagios-plugin-check_raid/check_raid:1.61
--- packages/nagios-plugin-check_raid/check_raid:1.60	Sat Oct 17 12:03:40 2009
+++ packages/nagios-plugin-check_raid/check_raid	Sun Oct 18 13:29:27 2009
@@ -883,6 +883,19 @@
 		push(@status, "$c: $s");
 	}
 
+	# check that no temp is over the treshold
+	my $warn = 28;
+	my $crit = 33;
+	while (my($t, $c) = each %t) {
+		if ($c > $crit) {
+			push(@status, "$t: ${c}C");
+			$status = $ERRORS{CRITICAL};
+		} elsif ($c > $warn) {
+			push(@status, "$t: ${c}C");
+			$status = $ERRORS{WARNING} unless $status;
+		}
+	}
+
 	$message .= "hp_msa: ".join(', ', @status) if @status;
 }
 
================================================================

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



More information about the pld-cvs-commit mailing list