Skip to content

Commit 6ffcf89

Browse files
authored
Add support for usbjmicron devices (#109)
Allows to monitor hard drives attached via USB-SATA enclosures.
1 parent b09f4f2 commit 6ffcf89

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

check_smart.pl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
# Mar 15, 2024: Yannick Martin - Fix nvme check when auto interface is given and device is nvme (6.14.2)
6464
# Sep 10, 2024: Claudio Kuenzler - Fix performance data format, missing perfdata in SCSI drives (6.14.3)
6565
# Jan 31, 2025: Tomas Barton - Ignore old age attributes due to its unrealiability. Check ATA error logs (6.15.0)
66+
# May 19, 2025: Alexander Kanevskiy - Add usbjmicron devics (6.16.0)
6667

6768
use strict;
6869
use Getopt::Long;
@@ -153,7 +154,7 @@
153154
# Allow all device types currently supported by smartctl
154155
# See http://www.smartmontools.org/wiki/Supported_RAID-Controllers
155156

156-
if ($opt_i =~ m/^(ata|scsi|3ware|areca|hpt|aacraid|cciss|megaraid|sat|auto|nvme)/) {
157+
if ($opt_i =~ m/^(ata|scsi|3ware|areca|hpt|aacraid|cciss|megaraid|sat|auto|nvme|usbjmicron)/) {
157158
$interface = $opt_i;
158159
if($interface =~ m/megaraid,\[(\d{1,2})-(\d{1,2})\]/) {
159160
$interface = "";
@@ -179,6 +180,12 @@
179180
$interface .= "aacraid," . $k . "|";
180181
}
181182
}
183+
elsif($interface =~ m/usbjmicron,\[(\d{1,2})-(\d{1,2})\]/) {
184+
$interface = "";
185+
for(my $k = $1; $k <= $2; $k++) {
186+
$interface .= "usbjmicron," . $k . "|";
187+
}
188+
}
182189
else {
183190
$interface .= "|";
184191
}

0 commit comments

Comments
 (0)