############################################################# ## # Email fuer Alerts set daemon 120 set mailserver localhost set mail-format { from: server@example.com subject: [$ACTION] $HOST $SERVICE $EVENT - monit } set alert admin@example.com ## ############################################################# ## fill level ## ## fill level boot-partition check device bootfs with path /dev/sda1 if space usage > 80% then alert ## ############################################################# ## Security Checks ## ## /etc check directory etc with path /etc if changed timestamp then alert ############################################################# ## essential Services ## ## ssh check process sshd with pidfile /var/run/sshd.pid start program "/etc/init.d/ssh start" stop program "/etc/init.d/ssh stop" if failed port 22 protocol ssh then restart if 5 restarts within 5 cycles then timeout ## ## cron check process cron with pidfile /var/run/crond.pid alert admin@example.com only on { nonexist } group system start program = "/etc/init.d/cron start" stop program = "/etc/init.d/cron stop" if 5 restarts within 5 cycles then timeout ##