Created
March 11, 2011 19:31
-
-
Save denmarkin/866427 to your computer and use it in GitHub Desktop.
real-world monit recipes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See: http://stackoverflow.com/questions/1226302/how-to-monitor-delayedjob-with-monit/1285611 | |
check process delayed_job with pidfile /full/path/to/app/shared/pids/delayed_job.pid | |
start program = "/bin/su - deploy_username -c 'cd /full/path/to/app/current/; RAILS_ENV=production script/delayed_job start'" | |
stop program = "/bin/su - deploy_username -c 'cd /full/path/to/app/current/; RAILS_ENV=production script/delayed_job stop'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace hostname in pid name | |
check process mysql with pidfile /var/lib/mysql/hostname.pid | |
start program = "/etc/init.d/mysql start" | |
stop program = "/etc/init.d/mysql stop" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you want to use nginx + passenger, I would suggest to install package first, then delete it. | |
# This action will give you init.d script. | |
# Then simply install passenger and allow it to compile nginx for you. | |
# Correct the paths in /etc/init.d/nginx script, and you're good to go. | |
check process nginx with pidfile /var/run/nginx.pid | |
start program = "/etc/init.d/nginx start" | |
stop program = "/etc/init.d/nginx stop" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace path to app and deploy_username | |
check process thinking_sphinx with pidfile /full/path/to/app/current/log/searchd.production.pid | |
start program = "/bin/su - deploy_username -c 'cd /full/path/to/app/current/; rake RAILS_ENV=production ts:start'" | |
stop program = "/bin/su - deploy_username -c 'cd /full/path/to/app/current/; rake RAILS_ENV=production ts:stop'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment