Skip to content

User config not working properly with Total_uncorrected_write_errors (and other write metrics potentially) #104

@Syphdias

Description

@Syphdias

I use the check_smart_attributes from the current HEAD. I noticed that it was not possible to change the thresholds of "Total_uncorrected_write_errors".
I suspect this to be faulty for all write metrics for "Generic SAS" devices since the +7 logic is absent from the ucfg parser.

Example:

Version

# md5sum ./check_smart_attributes
d458a3316b5fe07db8bbaf938a7152c6  ./check_smart_attributes

Currently at 7 Total uncorrected write errors

# smartctl -a /dev/sdb |grep uncorrected -3

Error counter log:
           Errors Corrected by           Total   Correction     Gigabytes    Total
               ECC          rereads/    errors   algorithm      processed    uncorrected
           fast | delayed   rewrites  corrected  invocations   [10^9 bytes]  errors
read:          0       25         0        83    6949314    1752293,432           0
write:         0      315         0       466    1291036     184008,911           7
# ./check_smart_attributes -db check_smartdb.json -d /dev/sdb
Critical (sdb) [sdb_Total_uncorrected_write_errors = Critical]|'sdb_Read_errors_corrected_by_ECC_fast'=0 'sdb_Write_errors_corrected_by_ECC_fast'=0 'sdb_Read_errors_corrected_by_ECC_delayed'=25 'sdb_Write_errors_corrected_by_ECC_delayed'=315 'sdb_Read_errors_corrected_by_ECC_reread'=0 'sdb_Write_errors_corrected_by_ECC_rewrite'=0 'sdb_Total_read_errors_corrected'=83 'sdb_Total_write_errors_corrected'=466 'sdb_Total_read_correction_algorithm_invocations'=6949314 'sdb_Total_write_correction_algorithm_invocations'=1291037 'sdb_Total_read_gigabytes_processed'=1752293,433 'sdb_Total_write_gigabytes_processed'=184008,916 'sdb_Total_uncorrected_read_errors'=0;0;0 'sdb_Total_uncorrected_write_errors'=7;0;0

Try to "mute" with Total uncorrectable write errors/14

# cat should_work_but_does_not.json 
{
	"Devices" : {
		"/dev/sdb" : {
			"Threshs" : {
				"14" : ["7","7"]
			}
		}
	}
}
# ./check_smart_attributes -db check_smartdb.json -ucfgj should_work_but_does_not.json -d /dev/sdb
Critical (sdb) [sdb_Total_uncorrected_write_errors = Critical]|'sdb_Read_errors_corrected_by_ECC_fast'=0 'sdb_Write_errors_corrected_by_ECC_fast'=0 'sdb_Read_errors_corrected_by_ECC_delayed'=25 'sdb_Write_errors_corrected_by_ECC_delayed'=315 'sdb_Read_errors_corrected_by_ECC_reread'=0 'sdb_Write_errors_corrected_by_ECC_rewrite'=0 'sdb_Total_read_errors_corrected'=83 'sdb_Total_write_errors_corrected'=466 'sdb_Total_read_correction_algorithm_invocations'=6949314 'sdb_Total_write_correction_algorithm_invocations'=1291037 'sdb_Total_read_gigabytes_processed'=1752293,433 'sdb_Total_write_gigabytes_processed'=184008,942 'sdb_Total_uncorrected_read_errors'=0;0;0 'sdb_Total_uncorrected_write_errors'=7;0;0

Try to "mute" with Total uncorrectable read errors/7

# cat should_not_work_but_does.json 
{
	"Devices" : {
		"/dev/sdb" : {
			"Threshs" : {
				"7" : ["7","7"]
			}
		}
	}
}
# ./check_smart_attributes -db check_smartdb.json -ucfgj should_not_work_but_does.json -d /dev/sdb
OK (sdb) |'sdb_Read_errors_corrected_by_ECC_fast'=0 'sdb_Write_errors_corrected_by_ECC_fast'=0 'sdb_Read_errors_corrected_by_ECC_delayed'=25 'sdb_Write_errors_corrected_by_ECC_delayed'=315 'sdb_Read_errors_corrected_by_ECC_reread'=0 'sdb_Write_errors_corrected_by_ECC_rewrite'=0 'sdb_Total_read_errors_corrected'=83 'sdb_Total_write_errors_corrected'=466 'sdb_Total_read_correction_algorithm_invocations'=6949314 'sdb_Total_write_correction_algorithm_invocations'=1291037 'sdb_Total_read_gigabytes_processed'=1752293,434 'sdb_Total_write_gigabytes_processed'=184008,945 'sdb_Total_uncorrected_read_errors'=0;7;7 'sdb_Total_uncorrected_write_errors'=7;7;7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions