The smartmontools package contains two utility programs (smartctl and smartd) to control and monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (SMART) built into most modern ATA and SCSI harddisks. In many cases, these utilities will provide advanced warning of disk degradation and failure. (The above shamelessly taken from the supplied URL).
I just installed it:
cd /usr/ports/sysutils/smartmontools/ && make install clean
Then I set up the configuration file, with default values:
cp -i /usr/local/etc/smartd.conf.sample /usr/local/etc/smartd.conf
And for smartd to run at boot:
echo 'smartd_enable="YES"' >> /etc/rc.conf
And started smartd:
Then I added this to /etc/periodic.conf to add drive health information to my daily status reports:
daily_status_smart_devices="/dev/ad8 /dev/ad10 /dev/ad12 /dev/ad14 /dev/ad16 /dev/ad24"
I also added a Nagios plugin for interfacing with SMART:
cd /usr/ports/net-mgmt/nagios-check_smartmon/ && make install clean
But there is a problem with this tool:
[root@kraken /usr/local/libexec/nagios]# ./check_smartmon -d /dev/ad8 ./check_smartmon:114: DeprecationWarning: os.popen3 is deprecated. Use the subprocess module. (child_stdin, child_stdout, child_stderr) = os.popen3(cmd) ./check_smartmon:127: DeprecationWarning: os.popen3 is deprecated. Use the subprocess module. (child_stdin, child_stdout, child_stderr) = os.popen3(cmd) OK: device is functional and stable (temperature: 33)
The last line of the output is appropriate. The preamble is not. This won’t work with Nagios until it is fixed.