Last active
August 29, 2015 14:11
-
-
Save SammyLin/cc367a8a2fe552bcbb1f to your computer and use it in GitHub Desktop.
monit configuration for solr and rails project
This file contains 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
check process solr-<%= fetch(:application) %> with pidfile <%= "#{shared_path}/pids/sunspot-solr.pid" %> | |
start program = "/bin/su - deploy -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec sunspot-solr start --port=8983 --data-directory=<%= shared_path %>/solr/data --pid-dir=<%= shared_path %>/pids'" | |
stop program = "/bin/su - deploy -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec sunspot-solr stop --pid-dir=<%= shared_path %>/pids'" | |
if failed host 127.0.0.1 port 8983 protocol http and request "/solr" then restart | |
if 3 restarts within 5 cycles then timeout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment