3

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

RichBos
  • 31
  • 3
  • 1
    CouchDB 1.6 fixed a [problem with the PID file](https://issues.apache.org/jira/browse/COUCHDB-1795). Which version do you use? Check what is displayed on http://127.0.0.1:5984/ – Aurélien Bénel Dec 02 '14 at 17:37

1 Answers1

0

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.

awenkhh
  • 5,811
  • 1
  • 21
  • 24