Skip to content

Commit

Permalink
Skip Percent_Lifetime_Used on SSD disks
Browse files Browse the repository at this point in the history
Attribute `Percent_Lifetime_Used` is not very reliable health indicator
  • Loading branch information
deric committed Sep 11, 2024
1 parent be2aac2 commit c967fc4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions check_smart.pl
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,14 @@
if (grep {$_ eq $attribute_number || $_ eq $attribute_name || $_ eq $when_failed} @exclude_checks) {
warn "SMART Attribute $attribute_name failed at $when_failed but was set to be ignored\n" if $opt_debug;
} else {
push(@warning_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;
if ($opt_o) {
if ($attribute_number == 202) { # Percent_Lifetime_Used might not be reliable health indicator
next;
}
}
push(@warning_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;
}
}
# some attributes produce questionable data; no need to graph them
Expand Down

0 comments on commit c967fc4

Please sign in to comment.