check_smart: Update to 6.14.2

This commit is contained in:
Jan Wagner 2024-07-23 08:10:10 +02:00
parent 95224ebfa5
commit 839264bc64
2 changed files with 5 additions and 3 deletions

6
check_smart/check_smart Normal file → Executable file
View file

@ -60,13 +60,14 @@
# Apr 29, 2023: Claudio Kuenzler - Add default check on Load Cycle Count (ignore using --skip-load-cycles) (6.14.0)
# Sep 20, 2023: Yannick Martin - Fix default Percent_Lifetime_Remain threshold handling when -w is given (6.14.1)
# Sep 20, 2023: Claudio Kuenzler - Fix debug output for raw check list, fix --hide-serial in debug output (6.14.1)
# Mar 15, 2024: Yannick Martin - Fix nvme check when auto interface is given and device is nvme (6.14.2)
use strict;
use Getopt::Long;
use File::Basename qw(basename);
my $basename = basename($0);
my $revision = '6.14.1';
my $revision = '6.14.2';
# Standard Nagios return codes
my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
@ -327,7 +328,7 @@ foreach $device ( split("\\|",$device) ){
$output_mode = "nvme";
warn "(debug) setting output mode to nvme\n" if $opt_debug;
} else {
$output_mode = "ata";
$output_mode = "ata" unless $output_mode;
}
warn "(debug) parsing line:\n$line\n" if $opt_debug;
if ($1 eq $ok_str_ata) {
@ -347,6 +348,7 @@ foreach $device ( split("\\|",$device) ){
warn "(debug) found model: $model\n\n" if $opt_debug;
}
if($line =~ /$line_model_nvme(.+)/){
$output_mode = "nvme";
warn "(debug) parsing line:\n$line\n\n" if $opt_debug;
$model = $1;
$model =~ s/\s{2,}/ /g;

View file

@ -1,6 +1,6 @@
Homepage: https://github.com/Napsty/check_smart
Uploaders: Jan Wagner <waja@cyconet.org>
Watch: https://raw.githubusercontent.com/Napsty/check_smart/master/check_smart.pl \$revision\ =\ '([0-9.]+)'
Version: 6.14.1
Version: 6.14.2
Description: plugin to check SMART status of ATA/SCSI/NVMe drives, returning any usable metrics as perfdata.
Recommends: perl-modules, monitoring-plugins-common | nagios-plugins-common