My monit script is verbatim, as monit is run as root I want couchdb run as couchdb so do the following
check process couchdb with pidfile /var/run/couchdb/couchdb.pid start program = "/usr/bin/sudo -u couchdb /usr/bin/couchdb -b -o /dev/null -e /dev/null -p /var/run/couchdb/couchdb.pid" stop program = "/usr/bin/sudo -u couchdb /usr/bin/couchdb -b -o /dev/null -e /dev/null -p /var/run/couchdb/couchdb.pid -d" try that and see what happens... On Mon, Oct 5, 2009 at 7:49 AM, Francisco Viramontes <[email protected]> wrote: > Hey Guys > > has anyone tried to monitor couch with monit? > > I am using this settings and monit successfully monitors but when couchdb > dies it fails to restart the service and I can find out why > > here is my couchdb.monitrc file: > > 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 127.0.0.1 port 5984 then restart > if failed url http://localhost:5984/ and content == '"couchdb"' then > restart > group couchdb > > BTW I am using couch 0.9.1 and about once a day it dies on me the only thing > I get from the log are strange erlang error messages saying OS procees > timeout, anyone know whats that about? > > PAco >
