
set daemon 120
set logfile /var/log/monit.log
set idfile /var/lib/monit/id
set statefile /var/lib/monit/state
set mailserver	localhost
set eventqueue
basedir /var/lib/monit/events
slots 100
set mail-format { from: monit@packetgeneral.com }
set alert noc@packetgeneral.com
check system sgl
if loadavg (1min) > 4 then alert
if loadavg (5min) > 2 then alert
if memory usage > 75% then alert
if cpu usage (user) > 70% then alert
if cpu usage (system) > 30% then alert
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 host 127.0.0.1 port 22 type tcp then alert
if 5 restarts within 5 cycles then timeout
group system
check filesystem rootfs with path /
if space usage > 80% then alert
group system
