Disk monitoring can be done via the package smartmontools
To get e-mail alerts, the server should have a mail transport agent (MTA) installed. Suggest to install postfix
.
postfix
, select Internet Site, and specify the hostname of the server for identification purposesinet_interfaces = loopback-only
myhostname = <HOSTNAME HERE>
mail -s "test subject" <EMAIL HERE> < file-with-test-body-content.txt
Set the e-mail address for sending alerts:
DEVICESCAN
lineDEVICESCAN -H -l error -l selftest -n standby -m <EMAIL HERE> -M exec /usr/share/smartmontools/smartd-runner
DEVICESCAN
line
/dev/sdc -d sat -d removable -H -l error -l selftest -n standby -m <EMAIL HERE> -M exec /usr/share/smartmontools/smartd-runner
-d
as required