Bug 913085 - check_ide_smart issues errors when value equals threshold
Summary: check_ide_smart issues errors when value equals threshold
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nagios-plugins
Version: el6
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Peter Lemenkov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-20 10:43 UTC by Andrew Meredith
Modified: 2014-02-11 06:54 UTC (History)
5 users (show)

Fixed In Version: nagios-plugins-1.4.16-10.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-27 03:57:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to import fix for SSD warnings on zero levels, from source forge patch (827 bytes, patch)
2013-05-14 00:35 UTC, Andrew Meredith
no flags Details | Diff
Sourceforge patch "check_ide_smart: fix smart attribute comparison - ID: 3428117" (827 bytes, application/x-gzip)
2013-05-14 00:39 UTC, Andrew Meredith
no flags Details

Description Andrew Meredith 2013-02-20 10:43:08 UTC
Description of problem:
Each S.M.A.R.T. attribute is compared against a threshold. If it is LESSTHAN that threshold an error is reported.
This patch fixes the problem, that attribute values EQUAL to the threshold are reported as error, which is wrong. Only LESSTHAN the threshold is an error.

For more information see: http://www.hdsentinel.com/smart/index.php

My SSD has some attributes which value and threshold are "0". Without the patch this is reported as errornous.

ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
...
172 Unknown_Attribute 0x0032 000 000 000 Old_age Always - 0
174 Unknown_Attribute 0x0030 000 000 000 Old_age Offline - 13
177 Wear_Leveling_Count 0x0000 000 000 000 Old_age Offline - 0

Version-Release number of selected component (if applicable):
nagios-plugins-ide_smart-1.4.16-5

How reproducible:
Every time

Steps to Reproduce:
1. Install SSD
2. Enable smartd on that device
3. Enable check_ide_smart for that device in Nagios
  
Actual results:
WARNING - 10 Harddrive Advisories Detected. 10/22 tests failed.

Expected results:
No failures

Additional info:
http://sourceforge.net/tracker/?func=detail&aid=3428117&group_id=29880&atid=397599

Comment 1 Andrew Meredith 2013-02-20 10:47:44 UTC
Using a "OCZ-VERTEX3 MI" 120G SSD the following results are found


# ./check_ide_smart -d /dev/sda
Id=  1, Status=15 {PreFailure , OnLine }, Value=110, Threshold= 50, Passed
Id=  5, Status=51 {PreFailure , OnLine }, Value=100, Threshold=  3, Passed
Id=  9, Status=50 {Advisory    , OnLine }, Value=100, Threshold=  0, Passed
Id= 12, Status=50 {Advisory    , OnLine }, Value=100, Threshold=  0, Passed
Id=171, Status=50 {Advisory    , OnLine }, Value=  0, Threshold=  0, Failed
Id=172, Status=50 {Advisory    , OnLine }, Value=  0, Threshold=  0, Failed
Id=174, Status=48 {Advisory    , OffLine}, Value=  0, Threshold=  0, Failed
Id=177, Status= 0 {Advisory    , OffLine}, Value=  0, Threshold=  0, Failed
Id=181, Status=50 {Advisory    , OnLine }, Value=  0, Threshold=  0, Failed
Id=182, Status=50 {Advisory    , OnLine }, Value=  0, Threshold=  0, Failed
Id=187, Status=50 {Advisory    , OnLine }, Value=100, Threshold=  0, Passed
Id=194, Status=34 {Advisory    , OnLine }, Value= 30, Threshold=  0, Passed
Id=195, Status=28 {Advisory    , OffLine}, Value=120, Threshold=  0, Passed
Id=196, Status=51 {PreFailure , OnLine }, Value=100, Threshold=  3, Passed
Id=201, Status=28 {Advisory    , OffLine}, Value=120, Threshold=  0, Passed
Id=204, Status=28 {Advisory    , OffLine}, Value=120, Threshold=  0, Passed
Id=230, Status=19 {PreFailure , OnLine }, Value=100, Threshold=  0, Passed
Id=231, Status=19 {PreFailure , OnLine }, Value=100, Threshold= 10, Passed
Id=233, Status= 0 {Advisory    , OffLine}, Value=  0, Threshold=  0, Failed
Id=234, Status=50 {Advisory    , OnLine }, Value=  0, Threshold=  0, Failed
Id=241, Status=50 {Advisory    , OnLine }, Value=  0, Threshold=  0, Failed
Id=242, Status=50 {Advisory    , OnLine }, Value=  0, Threshold=  0, Failed
OffLineStatus=0 {NeverStarted}, AutoOffLine=No, OffLineTimeout=0 minutes
OffLineCapability=123 {Immediate Auto SuspendOnCmd}
SmartRevision=10, CheckSum=55, SmartCapability=3 {SaveOnStandBy AutoSave}

Please note that the values that are "threshold = 0, value = 0" are not in error state.

The following is the full output from smartctl for this device

# smartctl --all /dev/sda
smartctl 5.40 2010-10-16 r3189 [x86_64-redhat-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Device Model:     OCZ-VERTEX3 MI
Serial Number:    OCZ-R23I341O9JCA9KX8
Firmware Version: 2.25
User Capacity:    120,034,123,776 bytes
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   8
ATA Standard is:  Not recognized. Minor revision code: 0x0110
Local Time is:    Wed Feb 20 10:46:27 2013 GMT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		 (   0) seconds.
Offline data collection
capabilities: 			 (0x7b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   1) minutes.
Extended self-test routine
recommended polling time: 	 (  48) minutes.
Conveyance self-test routine
recommended polling time: 	 (   2) minutes.
SCT capabilities: 	       (0x0021)	SCT Status supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   110   110   050    Pre-fail  Always       -       28604058
  5 Reallocated_Sector_Ct   0x0033   100   100   003    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       281174328999947
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       27
171 Unknown_Attribute       0x0032   000   000   000    Old_age   Always       -       0
172 Unknown_Attribute       0x0032   000   000   000    Old_age   Always       -       0
174 Unknown_Attribute       0x0030   000   000   000    Old_age   Offline      -       26
177 Wear_Leveling_Count     0x0000   000   000   000    Old_age   Offline      -       0
181 Program_Fail_Cnt_Total  0x0032   000   000   000    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   000   000   000    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0022   030   030   000    Old_age   Always       -       30 (Min/Max 30/30)
195 Hardware_ECC_Recovered  0x001c   120   120   000    Old_age   Offline      -       28604058
196 Reallocated_Event_Count 0x0033   100   100   003    Pre-fail  Always       -       0
201 Soft_Read_Error_Rate    0x001c   120   120   000    Old_age   Offline      -       28604058
204 Soft_ECC_Correction     0x001c   120   120   000    Old_age   Offline      -       28604058
230 Head_Amplitude          0x0013   100   100   000    Pre-fail  Always       -       100
231 Temperature_Celsius     0x0013   100   100   010    Pre-fail  Always       -       0
233 Media_Wearout_Indicator 0x0000   000   000   000    Old_age   Offline      -       367
234 Unknown_Attribute       0x0032   000   000   000    Old_age   Always       -       372
241 Total_LBAs_Written      0x0032   000   000   000    Old_age   Always       -       372
242 Total_LBAs_Read         0x0032   000   000   000    Old_age   Always       -       242

SMART Error Log Version: 0
No Errors Logged

SMART Self-test log structure revision number 0
Warning: ATA Specification requires self-test log structure revision number = 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]


SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

Comment 2 Andrew Meredith 2013-05-14 00:35:19 UTC
Created attachment 747479 [details]
Patch to import fix for SSD warnings on zero levels, from source forge patch

- Import fix for SSD warnings on zero levels, from source forge patch:
-      check_ide_smart: fix smart attribute comparison - ID: 3428117"
  (nagios-plugins-0009-check_ide_smart-fix-threshold.patch).

Comment 3 Andrew Meredith 2013-05-14 00:39:44 UTC
Created attachment 747480 [details]
Sourceforge patch "check_ide_smart: fix smart attribute comparison - ID: 3428117"

Import fix for SSD warnings on zero levels, from source forge patch:
     check_ide_smart: fix smart attribute comparison - ID: 3428117"
(nagios-plugins-0009-check_ide_smart-fix-threshold.patch).

Built and tested against Fedora 17 x86_64

The zero counts no longer trigger a warning.

Comment 4 Fedora Update System 2013-10-17 12:02:20 UTC
nagios-plugins-1.4.16-10.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/nagios-plugins-1.4.16-10.fc19

Comment 5 Fedora Update System 2013-10-17 12:02:40 UTC
nagios-plugins-1.4.16-10.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/nagios-plugins-1.4.16-10.fc20

Comment 6 Fedora Update System 2013-10-17 12:02:55 UTC
nagios-plugins-1.4.16-10.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/nagios-plugins-1.4.16-10.el6

Comment 7 Fedora Update System 2013-10-17 18:03:13 UTC
Package nagios-plugins-1.4.16-10.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing nagios-plugins-1.4.16-10.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-11845/nagios-plugins-1.4.16-10.el6
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-10-27 03:57:14 UTC
nagios-plugins-1.4.16-10.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2013-10-27 05:38:44 UTC
nagios-plugins-1.4.16-10.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2013-11-07 19:18:05 UTC
nagios-plugins-1.4.16-10.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2013-11-10 08:06:22 UTC
nagios-plugins-1.4.16-10.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.