No pid file for CouchDB on Ubuntu 14.04

870 Views Asked by At

We would like to monitor our CouchDB installation using the default pid file method with MONIT, however although couchdb is working fine there is no pid file generated under /var/run/couchdb, there is only a couch.uri file. Permissions on /var/run/couchdb are good (couch:couch) and service couchdb stop and start work fine, although for MONIT to stop/start we would need the /etc/init.d/couchdb start/stop option (which again isn't present).

For info we just installed using apt-get install couchdb on Ubuntu 14.04.

Any advice appreciated.

Best regards

RichBos

1

There are 1 best solutions below

0
On

I have done this with an older version (1.3) of CouchDB installed from source. Please check if this is working for you:

check process couchdb with pidfile   
/usr/local/var/run/couchdb/couchdb.pid
  group database
  start program = "/etc/init.d/couchdb start -u couchdb"
  stop  program = "/etc/init.d/couchdb stop -u couchdb"
  if failed host 127.0.0.1 port 5984 then restart
  if cpu is greater than 40% for 2 cycles then alert
  if cpu > 60% for 5 cycles then restart
  if 10 restarts within 10 cycles then timeout

If you have installed it via a package manager, you will most likely find the pid in /var/run/couchdb/couchdb.pid

The place of the pid file did not change since 1.3. So chances are good, that it's working for you.