install smartmontools to monitor your hard drives

aptitude install smartmontools

vim /etc/default/smartmontools

start_smartd=yes

vim /etc/smartd.conf

DEVICESCAN -d removable -n standby -m support@domain.com -M exec /usr/share/smartmontools/smartd-runner
/dev/sda -S on -o on -a -I 194 -m support@domain.com

If we have more than one hard drive
/dev/sda -S on -o on -a -I 194 -m support@domain.com

Now restart the service
/etc/init.d/smartmontools restart

Now configure exim to send email notifications

dpkg-reconfigure exim4-config

1) Split configuration into small files? No
2) General type of mail configuration: internet site; mail is sent and received directly using SMTP
3) System mail name: hostname.domain.name
4) IP-addresses to listen on for incoming SMTP connections: 127.0.0.1
5) Other destinations for which mail is accepted: hostname.domain.name
6) Domains to relay mail for: !! empty !!
7) Machines to relay mail for: !! empty !!
8) Keep number of DNS-queries minimal (Dial-on-Demand)?: No
9) Delivery method for local mail: mbox format in /var/mail/

Leave a Reply

Your email address will not be published. Required fields are marked *