Skip to content

Commit 0a4f089

Browse files
authored
Detect NVME I/O error (#116)
1 parent 1217f4c commit 0a4f089

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

check_smart.pl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@
6666
# Jun 12, 2025: Alexander Kanevskiy - Add usbjmicron devices (6.16.0)
6767
# Dec 15, 2025: Florian Sager - Fix evaluating ATA Error Count: 0 as a warning (6.17.0)
6868
# Dec 15, 2025: Philippe Beaumont - Add areca devices (6.17.0)
69-
# Apr 21, 2026: Claudio Kuenzler - Fix sys path for sudo command (6.17.1)
69+
# Apr 21, 2026: Claudio Kuenzler - Fix sys path for sudo command. Detect NVME input/output error (6.18.0)
7070

7171
use strict;
7272
use Getopt::Long;
7373
use File::Basename qw(basename);
7474

7575
my $basename = basename($0);
76-
my $revision = '6.17.1';
76+
my $revision = '6.18.0';
7777

7878
# Standard Nagios return codes
7979
my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
@@ -409,6 +409,11 @@
409409
$serial =~ s/^\s+|\s+$//g;
410410
warn "(debug) found serial number $serial\n\n" if $opt_debug;
411411
}
412+
if($line =~ /NVME_IOCTL_ADMIN_CMD: Input\/output error/){
413+
warn "(debug) NVMe I/O error detected:\n$line\n\n" if $opt_debug;
414+
push(@error_messages, 'NVMe I/O error (possible drive failure)');
415+
escalate_status('CRITICAL');
416+
}
412417

413418
}
414419

0 commit comments

Comments
 (0)