I am using this cronjob for monitoring updates and SMART values.
File: “/etc/cron.d/monitoring”
1 2 3 4 5 |
# Monitoring cronjob
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
33 3 * * 0 root apt-get update ; apt-get -q --simulate upgrade
34 3 * * 0 root smartctl -a /dev/sda ; smartctl -a /dev/sdb |
Dont forget to reload cron!
1 |
/etc/init.d/cron restart |
You will need this package: “smartmontools” for “smartctl”.
The output will be send via mail at root. You can configure that in “/etc/aliases” and then running “newaliases”.