matusnovak / prometheus-smartctl

HDD S.M.A.R.T exporter for Prometheus written in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong metrics

ngosang opened this issue · comments

I have an SSD NMVE M2 disk and the reported metrics are wrong. I always see 100 value in your exporter for almost all metrics.
If I execute the command smartctl -a /dev/sda inside your Docker image I get the right values in the raw_value column.

Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   050    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0
  3 Spin_Up_Time            0x0007   100   100   050    Pre-fail  Always       -       0
  5 Reallocated_Sector_Ct   0x0013   100   100   050    Pre-fail  Always       -       0
  7 Unknown_SSD_Attribute   0x000b   100   100   050    Pre-fail  Always       -       0
  8 Unknown_SSD_Attribute   0x0005   100   100   050    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       11432
 12 Power_Cycle_Count       0x0012   100   100   000    Old_age   Always       -       7574
168 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       0
170 Unknown_Attribute       0x0003   100   100   010    Pre-fail  Always       -       338
173 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       2293870
175 Program_Fail_Count_Chip 0x0013   100   100   050    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0012   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0012   100   100   000    Old_age   Always       -       38
194 Temperature_Celsius     0x0023   065   032   030    Pre-fail  Always       -       35 (Min/Max 20/68)
196 Reallocated_Event_Count 0x0002   100   100   010    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0
199 UDMA_CRC_Error_Count    0x000b   100   100   050    Pre-fail  Always       -       0
218 Unknown_Attribute       0x000b   100   100   050    Pre-fail  Always       -       0
231 Temperature_Celsius     0x0013   100   100   000    Pre-fail  Always       -       99
233 Media_Wearout_Indicator 0x000b   100   100   000    Pre-fail  Always       -       4846
240 Unknown_SSD_Attribute   0x0013   100   100   000    Pre-fail  Always       -       0
241 Total_LBAs_Written      0x0012   100   100   000    Old_age   Always       -       7481
242 Total_LBAs_Read         0x0012   100   100   000    Old_age   Always       -       10652
244 Unknown_Attribute       0x0002   100   100   000    Old_age   Always       -       35
245 Unknown_Attribute       0x0002   100   100   000    Old_age   Always       -       110
246 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       2405376

Update: I need the raw vales. I think it will be fixed by #15

Closed by #15