Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(inputs.smart): Improve regexp to support flags with a plus #14996

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

Akito0723
Copy link
Contributor

@Akito0723 Akito0723 commented Mar 15, 2024

change attribute regexp to support flags like this kind PO-RC-+

Summary

support smart attitudes data like this

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     PO-RC-+  200   200   051    -    30
  3 Spin_Up_Time            POSRCK+  230   230   021    -    5466
  4 Start_Stop_Count        -OS-CK+  100   100   000    -    6
  5 Reallocated_Sector_Ct   POS-C-+  200   200   140    -    0
  7 Seek_Error_Rate         PO-RCK+  200   200   051    -    0
  9 Power_On_Hours          -OSRCK+  092   092   000    -    5867
 10 Spin_Retry_Count        POS-CK+  100   253   051    -    0
 11 Calibration_Retry_Count -OSRCK+  100   253   051    -    0
 12 Power_Cycle_Count       -OSRCK+  100   100   000    -    6
184 End-to-End_Error        POSRCK+  100   100   097    -    0
187 Reported_Uncorrect      -OS-CK+  100   088   000    -    24
188 Command_Timeout         -OS--K+  100   100   000    -    0
190 Airflow_Temperature_Cel -O-RCK+  058   046   000    -    42
192 Power-Off_Retract_Count -O-RCK+  200   200   000    -    4
193 Load_Cycle_Count        --S-CK+  200   200   000    -    2
194 Temperature_Celsius     -OSRCK+  110   098   000    -    42
195 Hardware_ECC_Recovered  -OSRC-+  200   200   000    -    0
196 Reallocated_Event_Count -O-RCK+  200   200   000    -    0
197 Current_Pending_Sector  -OS-CK+  200   200   000    -    0
198 Offline_Uncorrectable   -OSRCK+  100   253   000    -    0
199 UDMA_CRC_Error_Count    -OS--K+  200   200   000    -    0
200 Multi_Zone_Error_Rate   POSRCK+  100   253   051    -    0
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #14995

@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@telegraf-tiger telegraf-tiger bot added area/smart fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Mar 15, 2024
@Akito0723 Akito0723 force-pushed the SMART-attributes-regex-change branch from 515d906 to c18b466 Compare March 15, 2024 06:20
@srebhan srebhan changed the title fix(inputs.smart): change smart attribute regexp to support flags like this kind PO-RC-+ fix(inputs.smart): Improve regexp to support flags with a plus Mar 15, 2024
@srebhan
Copy link
Member

srebhan commented Mar 15, 2024

@Akito0723 can you please confirm that you didn't use any AI to produce the code by ticking the box in the PR description!?!

@srebhan srebhan self-assigned this Mar 15, 2024
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution @Akito0723!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Mar 15, 2024
@srebhan srebhan assigned powersj and DStrand1 and unassigned srebhan Mar 15, 2024
@powersj powersj removed their assignment Mar 15, 2024
@DStrand1 DStrand1 merged commit 19ac5e8 into influxdata:master Mar 15, 2024
26 of 27 checks passed
@github-actions github-actions bot added this to the v1.30.1 milestone Mar 15, 2024
powersj pushed a commit that referenced this pull request Apr 1, 2024
@Akito0723 Akito0723 deleted the SMART-attributes-regex-change branch July 2, 2024 13:57
@Akito0723 Akito0723 restored the SMART-attributes-regex-change branch July 2, 2024 13:57
@Akito0723 Akito0723 deleted the SMART-attributes-regex-change branch July 2, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/smart fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[[inputs.smart]] SMART Attributes Data with different FLAGS
4 participants