Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package monitoring-plugins-smart for 
openSUSE:Factory checked in at 2023-05-13 18:14:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/monitoring-plugins-smart (Old)
 and      /work/SRC/openSUSE:Factory/.monitoring-plugins-smart.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "monitoring-plugins-smart"

Sat May 13 18:14:55 2023 rev:10 rq:1085776 version:6.14.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/monitoring-plugins-smart/monitoring-plugins-smart.changes
        2022-05-06 19:00:33.805436824 +0200
+++ 
/work/SRC/openSUSE:Factory/.monitoring-plugins-smart.new.1533/monitoring-plugins-smart.changes
      2023-05-13 18:14:55.640817349 +0200
@@ -1,0 +2,16 @@
+Sun Apr 30 13:44:12 UTC 2023 - l...@linux-schulserver.de - 6.14.0
+
+- Update to 6.14.0
+  + Show drive(s) causing the UNKNOWN status when checking multiple 
+    drives using -g / --global parameter #89
+  + Add possibility to hide the drive's serial number in the plugin output
+    using --hide-sn #90
+  + Check (by default) for high Load Cycle Count of hard drive. Can 
+    be ignored using --skip-load-cycles parameter #91
+- package SSD-TBW-Warranty.md as documentation
+- add user icinga to the sudo profile for check_smart - allowing 
+  icinga to execute the script as well
+- follow upstream license change: GPL-3.0-or-later
+- package COPYING.md as license file
+
+-------------------------------------------------------------------

Old:
----
  check_smart-6.13.0.tar.xz

New:
----
  check_smart-6.14.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ monitoring-plugins-smart.spec ++++++
--- /var/tmp/diff_new_pack.xZ5GTI/_old  2023-05-13 18:14:56.232820540 +0200
+++ /var/tmp/diff_new_pack.xZ5GTI/_new  2023-05-13 18:14:56.240820583 +0200
@@ -17,10 +17,10 @@
 
 
 Name:           monitoring-plugins-smart
-Version:        6.13.0
+Version:        6.14.0
 Release:        0
 Summary:        Check SMART status of a given disk
-License:        SUSE-Public-Domain
+License:        GPL-3.0-or-later
 Group:          System/Monitoring
 URL:            https://www.claudiokuenzler.com/nagios-plugins/check_smart.php
 Source0:        check_smart-%{version}.tar.xz
@@ -69,12 +69,13 @@
 mkdir -p %{buildroot}/%{_sysconfdir}/sudoers.d
 cat >> %{buildroot}/%{_sysconfdir}/sudoers.d/%{name} << EOF
 # the next line is needed for %{name} to allow the correct use of smartctl
-nagios        ALL=(root) NOPASSWD: %{nagios_plugindir}/check_smart
+nagios,icinga ALL=(root) NOPASSWD: %{nagios_plugindir}/check_smart
 EOF
 %endif
 
 %files
-%doc README.SUSE README.md
+%doc README.SUSE README.md SSD-TBW-Warranty.md
+%license COPYING.md
 %dir %{nagios_libdir}
 %dir %{_sysconfdir}/apparmor.d
 %dir %{nagios_plugindir}

++++++ check_smart-6.13.0.tar.xz -> check_smart-6.14.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check_smart-6.13.0/README.md 
new/check_smart-6.14.0/README.md
--- old/check_smart-6.13.0/README.md    2022-04-27 04:29:21.000000000 +0200
+++ new/check_smart-6.14.0/README.md    2023-04-29 11:40:58.000000000 +0200
@@ -75,4 +75,10 @@
     /usr/local/libexec/nagios/check_smart.pl -d /dev/da0 -i scsi
     OK: no SMART errors detected. |sent_blocks=14067306 temperature=34;;60
 
+Single NVMe drive on Linux:
+
+    /usr/lib/nagios/plugins/check_smart.pl -d /dev/nvme0 -i nvme
+    OK: Drive Samsung SSD 970 PRO 512GB S/N XXXXXXXXXXXXXXX: no SMART errors 
detected. |Temperature=34 Available_Spare=100 Available_Spare_Threshold=10 
Percentage_Used=0 Data_Units_Read=2854 Data_Units_Written=107590 
Host_Read_Commands=67150 Host_Write_Commands=1406316 Controller_Busy_Time=20 
Power_Cycles=16 Power_On_Hours=105 Unsafe_Shutdowns=6 
Media_and_Data_Integrity_Errors=0 Error_Information_Log_Entries=0 
Warning__Comp._Temperature_Time=0 Critical_Comp._Temperature_Time=0 
Temperature_Sensor_1=34 Temperature_Sensor_2=33
+
+
 see https://www.claudiokuenzler.com/monitoring-plugins/check_smart.php for 
more examples
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check_smart-6.13.0/SSD-TBW-Warranty.md 
new/check_smart-6.14.0/SSD-TBW-Warranty.md
--- old/check_smart-6.13.0/SSD-TBW-Warranty.md  1970-01-01 01:00:00.000000000 
+0100
+++ new/check_smart-6.14.0/SSD-TBW-Warranty.md  2023-04-29 11:40:58.000000000 
+0200
@@ -0,0 +1,53 @@
+# TBW Warranty List of known SSD drives
+There are two factors relevant to warranty of SSD drives: The time since the 
SSD was bought (Warranty Time) and the TBW (Total Bytes Written, sometimes also 
mentioned as TerraBytes Written) value. The warranty of a SSD drive is expired 
whichever of these two factors is reached first. 
+
+This table should help to have a quick overview of SSD drives and their 
(known) warrantly specifications. Based on this table (with sufficient data), 
the `check_smart.pl` plugin may detect expiring warranties in the future.
+
+Contributions welcome! ❤️
+
+## Overview of SSD drives and their warranty specifications
+ 
+| Vendor | Model | Product Name | Size/Capacity | Warranty Time | Endurance 
TBW | Links/References |
+|--------|-------|--------------|---------------|---------------|---------------|------------------|
+| <sub>Crucial</sb> | <sub>CT250MX500SSD1</sub> | <sub>Crucial MX500</sub> | 
<sub>250 GB</sub> | <sub>5 Years</sub> | <sub>100 TB</sub> | <sub>[Spec 
Sheet](https://content.crucial.com/content/dam/crucial/ssd-products/mx500/flyer/crucial-mx500-ssd-productflyer-en.pdf)</sub>
 |
+| <sub>Crucial</sb> | <sub>CT500MX500SSD1</sub> | <sub>Crucial MX500</sub> | 
<sub>500 GB</sub> | <sub>5 Years</sub> | <sub>180 TB</sub> | <sub>[Spec 
Sheet](https://content.crucial.com/content/dam/crucial/ssd-products/mx500/flyer/crucial-mx500-ssd-productflyer-en.pdf)</sub>
 |
+| <sub>Crucial</sb> | <sub>CT1000MX500SSD1</sub> | <sub>Crucial MX500</sub> | 
<sub>1 TB</sub> | <sub>5 Years</sub> | <sub>360 TB</sub> | <sub>[Spec 
Sheet](https://content.crucial.com/content/dam/crucial/ssd-products/mx500/flyer/crucial-mx500-ssd-productflyer-en.pdf)</sub>
 |
+| <sub>Crucial</sb> | <sub>CT2000MX500SSD1</sub> | <sub>Crucial MX500</sub> | 
<sub>2 TB</sub> | <sub>5 Years</sub> | <sub>700 TB</sub> | <sub>[Spec 
Sheet](https://content.crucial.com/content/dam/crucial/ssd-products/mx500/flyer/crucial-mx500-ssd-productflyer-en.pdf)</sub>
 |
+| <sub>Crucial</sb> | <sub>CT4000MX500SSD1</sub> | <sub>Crucial MX500</sub> | 
<sub>4 TB</sub> | <sub>5 Years</sub> | <sub>1000 TB</sub> | <sub>[Spec 
Sheet](https://content.crucial.com/content/dam/crucial/ssd-products/mx500/flyer/crucial-mx500-ssd-productflyer-en.pdf)</sub>
 |
+| <sub>Micron</sb> | <sub>MTFDDAK960TDT</sub> | <sub>5300 MAX</sub> | <sub>960 
GB</sub> | <sub>5 Years</sub> | <sub>8760 TB</sub> | <sub>[Spec 
Website](https://www.micron.com/products/ssd/bus-interfaces/sata-ssds/part-catalog/mtfddak960tdt-1aw1zab)</sub>
 |
+| <sub>SanDisk</sb> | <sub>SDSSDH31000G</sub> | <sub>SanDisk Ultra 3D 
SSD</sub> | <sub>1 TB</sub> | <sub>5 Years</sub> | <sub>400 TB</sub> | 
<sub>[Spec 
Sheet](https://documents.westerndigital.com/content/dam/doc-library/en_us/assets/public/sandisk/product/internal-drives/ultra-3d-sata-iii-ssd/datasheet-ultra-3d-sata-iii-ssd.pdf)</sub>
 |
+| <sub>SanDisk</sb> | <sub>SDSSDH32000G</sub> | <sub>SanDisk Ultra 3D 
SSD</sub> | <sub>2 TB</sub> | <sub>5 Years</sub> | <sub>500 TB</sub> | 
<sub>[Spec 
Sheet](https://documents.westerndigital.com/content/dam/doc-library/en_us/assets/public/sandisk/product/internal-drives/ultra-3d-sata-iii-ssd/datasheet-ultra-3d-sata-iii-ssd.pdf)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 850 EVO</sub> | <sub>850 EVO</sub> | <sub>250 
GB</sub> | <sub>5 Years</sub> | <sub>75 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/850evo/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 850 EVO</sub> | <sub>850 EVO</sub> | <sub>500 
GB</sub> | <sub>5 Years</sub> | <sub>150 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/850evo/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 850 EVO</sub> | <sub>850 EVO</sub> | <sub>1 
TB</sub> | <sub>5 Years</sub> | <sub>150 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/850evo/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 850 EVO</sub> | <sub>850 EVO</sub> | <sub>2 
TB</sub> | <sub>5 Years</sub> | <sub>300 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/850evo/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 850 EVO</sub> | <sub>850 EVO</sub> | <sub>4 
TB</sub> | <sub>5 Years</sub> | <sub>300 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/850evo/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 850 PRO</sub> | <sub>850 PRO</sub> | <sub>256 
GB</sub> | <sub>10 Years</sub> | <sub>150 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/850pro/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 850 PRO</sub> | <sub>850 PRO</sub> | <sub>512 
GB</sub> | <sub>10 Years</sub> | <sub>300 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/850pro/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 850 PRO</sub> | <sub>850 PRO</sub> | <sub>1 
TB</sub> | <sub>10 Years</sub> | <sub>300 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/850pro/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 850 PRO</sub> | <sub>850 PRO</sub> | <sub>2 
TB</sub> | <sub>10 Years</sub> | <sub>450 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/850pro/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 850 PRO</sub> | <sub>850 PRO</sub> | <sub>4 
TB</sub> | <sub>10 Years</sub> | <sub>600 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/850pro/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 860/870 EVO</sub> | <sub>860/870 EVO</sub>  | 
<sub>250 GB</sub> | <sub>5 Years</sub> | <sub>150 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/860evo/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 860/870 EVO</sub> | <sub>860/870 EVO</sub>  | 
<sub>500 GB</sub> | <sub>5 Years</sub> | <sub>300 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/860evo/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 860/870 EVO</sub> | <sub>860/870 EVO</sub>  | 
<sub>1 TB</sub> | <sub>5 Years</sub> | <sub>600 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/860evo/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 860/870 EVO</sub> | <sub>860/870 EVO</sub>  | 
<sub>2 TB</sub> | <sub>5 Years</sub> | <sub>1200 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/860evo/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 860/870 EVO</sub> | <sub>860/870 EVO</sub> | 
<sub>4 TB</sub> | <sub>5 Years</sub> | <sub>2400 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/860evo/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 860 PRO</sub> | <sub>860 PRO</sub> | <sub>256 
GB</sub> | <sub>5 Years</sub> | <sub>300 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/860pro/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 860 PRO</sub> | <sub>860 PRO</sub> | <sub>512 
GB</sub> | <sub>5 Years</sub> | <sub>600 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/860pro/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 860 PRO</sub> | <sub>860 PRO</sub> | <sub>1 
TB</sub> | <sub>5 Years</sub> | <sub>1200 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/860pro/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 860 PRO</sub> | <sub>860 PRO</sub> | <sub>2 
TB</sub> | <sub>5 Years</sub> | <sub>2400 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/860pro/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 860 PRO</sub> | <sub>860 PRO</sub> | <sub>4 
TB</sub> | <sub>5 Years</sub> | <sub>4800 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/860pro/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 870 QVO</sub> | <sub>870 QVO</sub>  | <sub>1 
TB</sub> | <sub>3 Years</sub> | <sub>360 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/870qvo/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 870 QVO</sub> | <sub>870 QVO</sub>  | <sub>2 
TB</sub> | <sub>3 Years</sub> | <sub>720 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/870qvo/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 870 QVO</sub> | <sub>870 QVO</sub>  | <sub>4 
TB</sub> | <sub>3 Years</sub> | <sub>1440 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/870qvo/)</sub>
 |
+| <sub>Samsung</sb> | <sub>SSD 870 QVO</sub> | <sub>870 QVO</sub>  | <sub>8 
TB</sub> | <sub>3 Years</sub> | <sub>2880 TB</sub> | <sub>[Spec 
Website](https://semiconductor.samsung.com/consumer-storage/internal-ssd/870qvo/)</sub>
 |
+| <sub>Western Digital</sb> | <sub>WDS120G1G0A</sub> | <sub>WD Green SSD 
(G1)</sub> | <sub>120 GB</sub> | <sub>3 Years</sub> | <sub>40 TB</sub> | 
<sub>[Spec 
Sheet](https://www.hye.co.il/Uploads/Products/Files/55/232828e4.pdf)</sub> |
+| <sub>Western Digital</sb> | <sub>WDS120G2G0A</sub> | <sub>WD Green SSD 
(G2)</sub> | <sub>120 GB</sub> | <sub>3 Years</sub> | <sub>40 TB</sub> | 
<sub>[Devicelist](https://devicelist.best/en/wd-green-wds120g2g0a/)</sub> |
+| <sub>Western Digital</sb> | <sub>WDS240G1G0A</sub> | <sub>WD Green SSD 
(G1)</sub> | <sub>240 GB</sub> | <sub>3 Years</sub> | <sub>80 TB</sub> | 
<sub>[Spec 
Sheet](https://www.hye.co.il/Uploads/Products/Files/55/232828e4.pdf)</sub> |
+| <sub>Western Digital</sb> | <sub>WDS240G2G0A</sub> | <sub>WD Green SSD 
(G2)</sub> | <sub>240 GB</sub> | <sub>3 Years</sub> | <sub>80 TB</sub> | 
<sub>[Devicelist](https://devicelist.best/en/wd-green-wds120g2g0a/)</sub> |
+| <sub>Western Digital</sb> | <sub>WDS100T2B0A</sub> | <sub>WD Blue 3D NAND 
SSD</sub> | <sub>1 TB</sub> | <sub>5 Years</sub> | <sub>400 TB</sub> | 
<sub>[Spec 
Sheet](https://products.wdc.com/library/SpecSheet/ENG/product-brief-wd-blue-3d-nand-sata-ssd.pdf)</sub>
 |
+| <sub>Western Digital</sb> | <sub>WDS200T2B0A</sub> | <sub>WD Blue 3D NAND 
SSD</sub> | <sub>2 TB</sub> | <sub>5 Years</sub> | <sub>500 TB</sub> | 
<sub>[Spec 
Sheet](https://products.wdc.com/library/SpecSheet/ENG/product-brief-wd-blue-3d-nand-sata-ssd.pdf)</sub>
 |
+| <sub>Western Digital</sb> | <sub>WDS500G1R0A</sub> | <sub>WD Red SA500 / NAS 
SSD</sub> | <sub>500 GB</sub> | <sub>5 Years</sub> | <sub>350 TB</sub> | 
<sub>[Spec 
Sheet](https://products.wdc.com/library/SpecSheet/ENG/02-01-WW-04-00048.pdf)</sub>
 |
+| <sub>Western Digital</sb> | <sub>WDS100T1R0A</sub> | <sub>WD Red SA500 / NAS 
SSD</sub> | <sub>1 TB</sub> | <sub>5 Years</sub> | <sub>600 TB</sub> | 
<sub>[Spec 
Sheet](https://products.wdc.com/library/SpecSheet/ENG/02-01-WW-04-00048.pdf)</sub>
 |
+| <sub>Western Digital</sb> | <sub>WDS200T1R0A</sub> | <sub>WD Red SA500 / NAS 
SSD</sub> | <sub>2 TB</sub> | <sub>5 Years</sub> | <sub>1300 TB</sub> | 
<sub>[Spec 
Sheet](https://products.wdc.com/library/SpecSheet/ENG/02-01-WW-04-00048.pdf)</sub>
 |
+| <sub>Western Digital</sb> | <sub>WDS400T1R0A</sub> | <sub>WD Red SA500 / NAS 
SSD</sub> | <sub>4 TB</sub> | <sub>5 Years</sub> | <sub>2500 TB</sub> | 
<sub>[Spec 
Sheet](https://products.wdc.com/library/SpecSheet/ENG/02-01-WW-04-00048.pdf)</sub>
 |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/check_smart-6.13.0/check_smart.pl 
new/check_smart-6.14.0/check_smart.pl
--- old/check_smart-6.13.0/check_smart.pl       2022-04-27 04:29:21.000000000 
+0200
+++ new/check_smart-6.14.0/check_smart.pl       2023-04-29 11:40:58.000000000 
+0200
@@ -55,13 +55,16 @@
 # Dec 16, 2021: Lorenz Kaestle - Bugfix when interface parameter was missing 
in combination with -g (6.12.2)
 # Apr 27, 2022: Claudio Kuenzler - Allow skip temperature check 
(--skip-temp-check) (6.13.0)
 # Apr 27, 2022: Peter Newman - Better handling of missing or non-executable 
smartctl command (6.13.0)
+# Apr 29, 2023: Nick Bertrand - Show drive(s) causing UNKNOWN status using 
-g/--global check (6.14.0)
+# Apr 29, 2023: Claudio Kuenzler - Add possibility to hide serial number 
(--hide-sn) (6.14.0)
+# Apr 29, 2023: Claudio Kuenzler - Add default check on Load Cycle Count 
(ignore using --skip-load-cycles) (6.14.0)
 
 use strict;
 use Getopt::Long;
 use File::Basename qw(basename);
 
 my $basename = basename($0);
-my $revision = '6.13.0';
+my $revision = '6.14.0';
 
 # Standard Nagios return codes
 my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
@@ -71,7 +74,7 @@
 $ENV{'BASH_ENV'}='';
 $ENV{'ENV'}='';
 
-use vars qw($opt_b $opt_d $opt_g $opt_debug $opt_h $opt_i $opt_e $opt_E $opt_r 
$opt_s $opt_v $opt_w $opt_q $opt_l $opt_skip_sa $opt_skip_temp);
+use vars qw($opt_b $opt_d $opt_g $opt_debug $opt_h $opt_i $opt_e $opt_E $opt_r 
$opt_s $opt_v $opt_w $opt_q $opt_l $opt_skip_sa $opt_skip_temp 
$opt_skip_load_cycles $opt_hide_sn);
 Getopt::Long::Configure('bundling');
 GetOptions(
                           "debug"         => \$opt_debug,
@@ -90,6 +93,8 @@
         "l"   => \$opt_l, "ssd-lifetime"  => \$opt_l,
                          "skip-self-assessment" => \$opt_skip_sa,
                          "skip-temp-check" => \$opt_skip_temp,
+                         "skip-load-cycles" => \$opt_skip_load_cycles,
+                         "hide-sn" => \$opt_hide_sn,
 );
 
 if ($opt_v) {
@@ -242,6 +247,7 @@
 my @drives_status_not_okay;
 my @drives_status_warning;
 my @drives_status_critical;
+my @drives_status_unknown;
 my $drive_details;
 
 foreach $device ( split("\\|",$device) ){
@@ -355,8 +361,13 @@
                        }
                        if($line =~ /$line_serial_ata(.+)/){
                                warn "(debug) parsing line:\n$line\n\n" if 
$opt_debug;
-                               $serial = $1;
-                               $serial =~ s/^\s+|\s+$//g;
+                               if($opt_hide_sn) {
+                                 $serial = "<HIDDEN>";
+                                 warn "(debug) Hiding serial number\n\n" if 
$opt_debug;
+                               } else {
+                                 $serial = $1;
+                                 $serial =~ s/^\s+|\s+$//g;
+                               }
                                warn "(debug) found serial number $serial\n\n" 
if $opt_debug;
                        }
                        if($line =~ /$line_serial_scsi(.+)/){
@@ -498,6 +509,19 @@
                                        warn "(debug) SMART Attribute 
$attribute_name was set to be ignored\n\n" if $opt_debug;
                                        next;
                                } else {
+                               # alert for high load cycles, generally up to 
600K cycles are considered safe on HDDs
+                               unless($opt_skip_load_cycles) {
+                                 if ($attribute_number == 193) {
+                                       if ($raw_value > 600000) {
+                                         warn "(debug) $attribute_name is 
above value considered safe (600K)\n\n" if $opt_debug;
+                                         push(@error_messages, 
"$attribute_name is above 600K load cycles ($raw_value) causing possible 
performance and durability impact");
+                                         escalate_status('CRITICAL');
+                                       } elsif ($raw_value < 600000 && 
$raw_value > 550000) {
+                                         warn "(debug) $attribute_name is 
nearing 600K load cycles\n\n" if $opt_debug;
+                                         push(@warning_messages, 
"$attribute_name is soon reaching 600K load cycles ($raw_value) causing 
possible performance and durability impact soon");
+                                       }
+                                 }
+                               }
                                # manual checks on raw values for certain 
attributes deemed significant
                                  if (grep {$_ eq $attribute_name} 
@raw_check_list) {
                                    if ($raw_value > 0) {
@@ -733,6 +757,8 @@
                    push @drives_status_warning, $status_string;
                  } elsif ($exit_status_local eq 'CRITICAL') {
                    push @drives_status_critical, $status_string;
+                 } elsif ($exit_status_local eq 'UNKNOWN') {
+                   push @drives_status_unknown, $status_string;
                  }
                }
                else {
@@ -771,6 +797,10 @@
   push @drives_status_not_okay, @drives_status_warning;
 }
 
+if (scalar(@drives_status_unknown) > 0) {
+  push @drives_status_not_okay, @drives_status_unknown;
+}
+
 if (@drives_status_not_okay) {
        push @msg_list, grep { $_ } @drives_status_not_okay;
 }
@@ -828,6 +858,8 @@
         print "  -l/--ssd-lifetime: Check attribute 'Percent_Lifetime_Remain' 
available on some SSD drives\n";
         print "  --skip-self-assessment: Skip SMART self-assessment health 
status check\n";
         print "  --skip-temp-check: Skip temperature comparison current vs. 
drive max temperature\n";
+        print "  --skip-load-cycles: Do not alert on high load/unload cycle 
count (600K considered safe on hard drives)\n";
+        print "  --hide-sn: Do not show drive serial number in output\n";
         print "  -h/--help: this help\n";
         print "  -q/--quiet: When faults detected, only show faulted drive(s) 
(only affects output when used with -g parameter)\n";
         print "  --debug: show debugging information\n";

Reply via email to