Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@masatomo
Created February 16, 2010 03:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masatomo/305260 to your computer and use it in GitHub Desktop.
Save masatomo/305260 to your computer and use it in GitHub Desktop.
set httpd port 2812
allow 192.168.123.0/24 # allow localhost to connect to the server and
set daemon 120 # check services at 2-minute intervals
with start delay 240 # optional: delay the first check by 4-minutes
# (by default check immediately after monit start)
set logfile syslog facility log_daemon
set idfile /usr/local/app/APPLICATION/shared/monit.id
check process resque-1 with pidfile /usr/local/app/APPLICATION/shared/pids/resque.1.pid
group resque
start program = "/usr/bin/env RAILS_ENV=production QUEUE=high,low /usr/local/app/APPLICATION/current/script/resque start 1"
stop program = "/usr/local/app/APPLICATION/current/script/resque stop 1"
check process resque-2 with pidfile /usr/local/app/APPLICATION/shared/pids/resque.2.pid
group resque
start program = "/usr/bin/env RAILS_ENV=production QUEUE=high,low /usr/local/app/APPLICATION/current/script/resque start 2"
stop program = "/usr/local/app/APPLICATION/current/script/resque stop 2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment