How to generate alerts for S.M.A.R.T. warnings and errors

29 views
Skip to first unread message

R. Diez

unread,
Nov 13, 2021, 2:27:49 PM11/13/21
to Prometheus Users
Hi all:

Whenever I have to maintain a PC, I look at GSmartControl (on Linux) or CrystalDiskInfo (on Windows).

If any S.M.A.R.T. attributes are red or yellow, I know that something is not quite right with the disk.

I would like Prometheus to automate this by generating alerts for SMART warnings or errors.

I would have thought this to be a basic feature for such an advanced monitoring system like Prometheus, but alas, I have found no easy solution yet.

The Windows Exporter seems to deliver no such disk information, but the Node Exporter for Linux/Unix does deliver SMART attributes like "reallocated sector count":

# HELP smartmon_reallocated_sector_ct_raw_value SMART metric reallocated_sector_ct_raw_value
# TYPE smartmon_reallocated_sector_ct_raw_value gauge
smartmon_reallocated_sector_ct_raw_value{disk="/dev/sda",smart_id="5",type="sat"} 0

# HELP smartmon_reallocated_sector_ct_threshold SMART metric reallocated_sector_ct_threshold
# TYPE smartmon_reallocated_sector_ct_threshold gauge
smartmon_reallocated_sector_ct_threshold{disk="/dev/sda",smart_id="5",type="sat"} 36

# HELP smartmon_reallocated_sector_ct_value SMART metric reallocated_sector_ct_value
# TYPE smartmon_reallocated_sector_ct_value gauge
smartmon_reallocated_sector_ct_value{disk="/dev/sda",smart_id="5",type="sat"} 100

# HELP smartmon_reallocated_sector_ct_worst SMART metric reallocated_sector_ct_worst
# TYPE smartmon_reallocated_sector_ct_worst gauge
smartmon_reallocated_sector_ct_worst{disk="/dev/sda",smart_id="5",type="sat"} 100

I am no S.M.A.R.T. expert. Can anyone tell me how to generate alerts from those values?

Or is there a better way? Any alternative for Microsoft Windows?

Thanks in advance,
  rdiez

R. Diez

unread,
Nov 21, 2021, 5:54:59 PM11/21/21
to Prometheus Users
For future reference, this is a GitHub issue about this for Windows:

Feature Request: SMART-values

Reply all
Reply to author
Forward
0 new messages