+

Added exception for errors In_the_past

Benjamin Renard [2011-05-13 13:13:46]
Added exception for errors In_the_past
Filename
check_smart
diff --git a/check_smart b/check_smart
index 4d1e57e..be41de4 100644
--- a/check_smart
+++ b/check_smart
@@ -209,7 +209,7 @@ if ($interface eq 'ata'){
 		#    9 Power_On_Minutes        0x0032   241   241   000    Old_age   Always       -       113h+12m
 		next unless $line =~ /^\s*\d+\s(\S+)\s+(?:\S+\s+){6}(\S+)\s+(\d+)/;
 		my ($attribute_name, $when_failed, $raw_value) = ($1, $2, $3);
-		if ($when_failed ne '-'){
+		if ($when_failed ne '-' && $when_failed ne 'In_the_past'){
 			push(@error_messages, "Attribute $attribute_name failed at $when_failed");
 			escalate_status('WARNING');
 			warn "(debug) parsed SMART attribute $attribute_name with error condition:\n$when_failed\n\n" if $opt_debug;
ViewGit