Skip to content

Instantly share code, notes, and snippets.

@johnko
Created May 30, 2015 20:02
Show Gist options
  • Save johnko/7842883ec28dad5362b0 to your computer and use it in GitHub Desktop.
Save johnko/7842883ec28dad5362b0 to your computer and use it in GitHub Desktop.
monit couchdb by port and restart
#################################################################
# couchdb
# http://nikosmarkopoulos.com/monitoring-couchdb-with-monit/
################################################################
check process couchdb
with pidfile /var/run/couchdb/couchdb.pid
start program = "/etc/init.d/couchdb start"
stop program = "/etc/init.d/couchdb stop"
if failed host localhost port 5984 proto http then restart
if failed url http://localhost:5984/ and content == '"couchdb"' then restart
if 3 restarts within 5 cycles then timeout
group couchdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment