matusnovak / prometheus-smartctl

HDD S.M.A.R.T exporter for Prometheus written in Python
The Unlicense
155 stars 43 forks source link

Using SMART tool to get the devices instead of glob #14

Closed Jopaul-John closed 2 years ago

Jopaul-John commented 2 years ago

The current code uses a regular expression to get the drives in the system. This can lead to finding unsupported smartctl drives like USB/Virtual drives. So instead, a better way is to use the smartctl scan functionality that will only fetch the drives which are compatible.

Removed variable TYPES since it is no longer used

Removed the if statement, because

Removed unused codes

ngosang commented 2 years ago

Thank you @Jopaul-John