Storage devices monitoring with Netdata
Monitors smartd
log files to collect HDD/SSD S.M.A.R.T attributes.
Requirements
smartmontools
It produces following charts for SCSI devices:
Read Error Corrected
Read Error Uncorrected
Write Error Corrected
Write Error Uncorrected
Verify Error Corrected
Verify Error Uncorrected
Temperature
For ATA devices:
Read Error Rate
Seek Error Rate
Soft Read Error Rate
Write Error Rate
SATA Interface Downshift
UDMA CRC Error Count
Throughput Performance
Seek Time Performance
Start/Stop Count
Power-On Hours Count
Power Cycle Count
Unexpected Power Loss
Spin-Up Time
Spin-up Retries
Calibration Retries
Temperature
Reallocated Sectors Count
Reserved Block Count
Program Fail Count
Erase Fail Count
Wear Leveller Worst Case Erase Count
Unused Reserved NAND Blocks
Reallocation Event Count
Current Pending Sector Count
Offline Uncorrectable Sector Count
Percent Lifetime Used
prerequisite
smartd
must be running with -A
option to write smartd attribute information to files.
For this you need to set smartd_opts
(or SMARTD_ARGS
, check smartd.service content) in /etc/default/smartmontools
:
# dump smartd attrs info every 600 seconds
smartd_opts="-A /var/log/smartd/ -i 600"
You may need to create the smartd directory before smartd will write to it:
mkdir -p /var/log/smartd
Otherwise, all the smartd .csv
files may get written to /var/lib/smartmontools
(default location). See also https://linux.die.net/man/8/smartd for more info on the -A --attributelog=PREFIX
command.
smartd
appends logs at every run. It's strongly recommended to use logrotate
for smartd files.
Configuration
Edit the python.d/smartd_log.conf
configuration file using edit-config
from the Netdata config
directory, which is typically at /etc/netdata
.
cd /etc/netdata # Replace this path with your Netdata config directory, if different
sudo ./edit-config python.d/smartd_log.conf
local:
log_path : '/var/log/smartd/'
If no configuration is given, module will attempt to read log files in /var/log/smartd/
directory.
Was this page helpful?
Need further help?
Search for an answer in our community forum.
Contribute
- Join our community forum
- Learn how to contribute to Netdata's open-source project
- Submit a feature request