![]() |
1 year ago | |
---|---|---|
.. | ||
Makefile.inc | 6 years ago | |
README.md | 2 years ago | |
metadata.yaml | 1 year ago | |
smartd_log.chart.py | 2 years ago | |
smartd_log.conf | 1 year ago |
Monitors smartd
log files to collect HDD/SSD S.M.A.R.T attributes.
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
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.
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.
To troubleshoot issues with the smartd_log
module, run the python.d.plugin
with the debug option enabled. The
output will give you the output of the data collection job or error messages on why the collector isn't working.
First, navigate to your plugins directory, usually they are located under /usr/libexec/netdata/plugins.d/
. If that's
not the case on your system, open netdata.conf
and look for the setting plugins directory
. Once you're in the
plugin's directory, switch to the netdata
user.
cd /usr/libexec/netdata/plugins.d/
sudo su -s /bin/bash netdata
Now you can manually run the smartd_log
module in debug mode:
./python.d.plugin smartd_log debug trace