New monitoring plugin check couchdb replication to monitor CouchDB replications

Written by - 0 comments

Published on - Listed in Nagios Icinga Monitoring Database CouchDB


It's 2018 now and this means it's almost been 10 years since my first (public) monitoring plugin (check_mysql_slavestatus). Today's the time for a new one: check_couchdb_replication. This is a monitoring plugin to monitor the status of CouchDB replications. 

As I'm not an expert of CouchDB the plugin might not be 100% correct yet. Mainly the dynamic detection of replications might be wrong, but the replication status check itself (and this is what it's about) should be working and should be ready for production monitoring.

The documentation of check_couchdb_replication contains config example for Icinga1/Nagios and Icinga2. Here are some examples when the plugin is run on the command line.

Check the status of replication "rep_db1":

# ./check_couchdb_replication.sh -H mycouchdb.example.com -u admin -p mysecretpass -r "rep_db1"
COUCHDB REPLICATION OK - Replication rep_db1 is "running"

If there is no such replication with this doc_id (rep_db1), the plugin will return:

# ./check_couchdb_replication.sh -H mycouchdb.example.com -u admin -p mysecretpass -r "rep_db3"
COUCHDB REPLICATION CRITICAL - Replication for rep_db3 not found

If you're not sure or you forgot the name (doc_id) of a replication, run the plugin with the -d (detect) parameter:

# ./check_couchdb_replication.sh -H mycouchdb.example.com -d
COUCHDB AVAILABLE REPLICATIONS: "rep_db1" "rep_db2"

In the background, the plugin uses "/_active_tasks" the find the available replications.

Feedback and contributions are welcome as always.


Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.