set daemon 30 # Poll at 30 sec intervals
set logfile /opt/rails/chow/production/shared/log/monit.log
set pidfile /opt/rails/chow/production/shared/log/monit.pid
set statefile /opt/rails/chow/production/shared/log/monit.state
set alert dude@email.com
check process pen
with pidfile "/opt/rails/chow/production/shared/log/pen.pid"
start program = "/opt/rails/chow/production/current/admin/pen_production start"
stop program = "/opt/rails/chow/production/current/admin/pen_production stop"
if 2 restarts within 3 cycles then timeout
check process mongrel-8220
with pidfile "/opt/rails/chow/production/shared/log/mongrel.8220.pid"
group mongrel
start program = "/opt/rails/chow/production/current/admin/mongrel start 8220"
stop program = "/opt/rails/chow/production/current/admin/mongrel stop 8220"
if 2 restarts within 3 cycles then timeout
check process mongrel-8221
with pidfile "/opt/rails/chow/production/shared/log/mongrel.8221.pid"
group mongrel
start program = "/opt/rails/chow/production/current/admin/mongrel start 8221"
stop program = "/opt/rails/chow/production/current/admin/mongrel stop 8221"
if 2 restarts within 3 cycles then timeout
check process mongrel-8222
with pidfile "/opt/rails/chow/production/shared/log/mongrel.8222.pid"
group mongrel
start program = "/opt/rails/chow/production/current/admin/mongrel start 8222"
stop program = "/opt/rails/chow/production/current/admin/mongrel stop 8222"
if 2 restarts within 3 cycles then timeout
check process mongrel-8223
with pidfile "/opt/rails/chow/production/shared/log/mongrel.8223.pid"
group mongrel
start program = "/opt/rails/chow/production/current/admin/mongrel start 8223"
stop program = "/opt/rails/chow/production/current/admin/mongrel stop 8223"
if 2 restarts within 3 cycles then timeout
check process mongrel-8224
with pidfile "/opt/rails/chow/production/shared/log/mongrel.8224.pid"
group mongrel
start program = "/opt/rails/chow/production/current/admin/mongrel start 8224"
stop program = "/opt/rails/chow/production/current/admin/mongrel stop 8224"
if 2 restarts within 3 cycles then timeout
check process mongrel-8225
with pidfile "/opt/rails/chow/production/shared/log/mongrel.8225.pid"
group mongrel
start program = "/opt/rails/chow/production/current/admin/mongrel start 8225"
stop program = "/opt/rails/chow/production/current/admin/mongrel stop 8225"
if 2 restarts within 3 cycles then timeout
check process mongrel-8226
with pidfile "/opt/rails/chow/production/shared/log/mongrel.8226.pid"
group mongrel
start program = "/opt/rails/chow/production/current/admin/mongrel start 8226"
stop program = "/opt/rails/chow/production/current/admin/mongrel stop 8226"
if 2 restarts within 3 cycles then timeout
check process mongrel-8227
with pidfile "/opt/rails/chow/production/shared/log/mongrel.8227.pid"
group mongrel
start program = "/opt/rails/chow/production/current/admin/mongrel start 8227"
stop program = "/opt/rails/chow/production/current/admin/mongrel stop 8227"
if 2 restarts within 3 cycles then timeout