fix(inputs.smart): Improve regexp to support flags with a plus (#14996)
This commit is contained in:
parent
a2ec0121d9
commit
19ac5e8081
|
|
@ -56,7 +56,12 @@ var (
|
|||
// 1 Raw_Read_Error_Rate -O-RC- 200 200 000 - 0
|
||||
// 5 Reallocated_Sector_Ct PO--CK 100 100 000 - 0
|
||||
// 192 Power-Off_Retract_Count -O--C- 097 097 000 - 14716
|
||||
attribute = regexp.MustCompile(`^\s*([0-9]+)\s(\S+)\s+([-P][-O][-S][-R][-C][-K])\s+([0-9]+)\s+([0-9]+)\s+([0-9-]+)\s+([-\w]+)\s+([\w\+\.]+).*$`)
|
||||
|
||||
// ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE
|
||||
// 1 Raw_Read_Error_Rate PO-RC-+ 200 200 051 - 30
|
||||
// 5 Reallocated_Sector_Ct POS-C-+ 200 200 140 - 0
|
||||
// 192 Power-Off_Retract_Count -O-RCK+ 200 200 000 - 4
|
||||
attribute = regexp.MustCompile(`^\s*([0-9]+)\s(\S+)\s+([-P][-O][-S][-R][-C][-K])[\+]?\s+([0-9]+)\s+([0-9]+)\s+([0-9-]+)\s+([-\w]+)\s+([\w\+\.]+).*$`)
|
||||
|
||||
// Additional Smart Log for NVME device:nvme0 namespace-id:ffffffff
|
||||
// nvme version 1.14+ metrics:
|
||||
|
|
|
|||
Loading…
Reference in New Issue