Couchbase check for Nagios/Icinga

Couchbase is a NoSQL document database designed for high scalability and availability. It’s very flexible and dead easy to configure once it’s installed. And it’s much more than simple NoSQL for documents, for example it can be used as a Memcached replacement.

But having application deployed, working and stable is not the end of Sysadmins work. We must now set up full monitoring, backups, check application for weak spots and harden the security. The usual “our work is never over”. And I’m not implying that developer life is easier.

For many years now I was using Nagios and now Icinga as a monitoring solution of my choice. I like it, it’s fast, reliable, easy to configure (once you know how it’s done) and maintain.

To monitor most basic metrics in Couchbase you can use its API which is throwing at you a simple JSON responses (and it’s used to much more than getting information from the server). To use it, you could use one of SDKs given by the Couchbase¬†or just connect with API to get what you need.

I’ve created a simple Python check for Couchbase that is retrieving data from API using cURL. There are two checks there: overall system data usage and data usage per data bucket.

You can check out the code on my Github repository. This check is not yet uploaded to Nagios Exchange.

Send me a message if you find any errors, have an idea or just want to say hi. :)