Git Product home page Git Product logo

couchdb-prometheus-exporter's Introduction

CouchDB Prometheus Exporter

Build Status

CouchDB metrics exporter for Prometheus

The CouchDB metrics exporter requests the CouchDB stats from the /_stats and /_active_tasks endpoints and exposes them for Prometheus consumption. You can optionally monitor detailed database stats like disk and data size to monitor the storage overhead. The exporter can be configured via program parameters, environment variables, and config file.

Run it as container

docker run -p 9984:9984 gesellix/couchdb-prometheus-exporter --couchdb.uri=http://couchdb:5984 --logtostderr

The couchdb-exporter uses the glog library for logging. With the default parameters everything will be logged to /tmp/. Use --logtostderr to enable logging to stderr and --help to see all options.

For CouchDB 2.x, you should configure the exporter to fetch the stats from one node, to get a complete cluster overview. In contrast to CouchDB 1.x you'll need to configure the admin credentials, e.g. like this:

docker run -p 9984:9984 gesellix/couchdb-prometheus-exporter --couchdb.uri=http://couchdb:5984 --couchdb.username=root --couchdb.password=a-secret

Database disk usage stats

If you need database disk usage stats, add a comma separated list of database names like this:

docker run -p 9984:9984 gesellix/couchdb-prometheus-exporter --couchdb.uri=http://couchdb:5984 --databases=db-1,db-2 --couchdb.username=root --couchdb.password=a-secret

Or, if you want to get stats for every database, please use _all_dbs as database name:

docker run -p 9984:9984 gesellix/couchdb-prometheus-exporter --couchdb.uri=http://couchdb:5984 --databases=_all_dbs --couchdb.username=root --couchdb.password=a-secret

Monitoring CouchDB with Prometheus, Grafana and Docker

For a step-by-step guide, see Monitoring CouchDB with Prometheus, Grafana and Docker

A complete example stack including multiple CouchDB instances, exporters, Prometheus, Grafana, etc. is available at examples/grafana/, and can be deployed locally:

cd examples/grafana
docker swarm init
docker stack deploy --compose-file docker-traefik-stack.yml example

Examples

The examples directory in this repository contains ready-to-run examples for

Credits

Thanks go to the Prometheus team, which is very active and responsive!

I also have to admit that the couchdb-prometheus-exporter code is heavily inspired by the other available exporters, and that some ideas have just been copied from them.

Last but not least, this project wouldn't be possible without users submitting issues, feature requests and adding code contributions. Thanks a lot!

Metrics Overview

The file README_metrics.md gives you an overview on the currently exposed metrics.

couchdb-prometheus-exporter's People

Contributors

gesellix avatar obaudys avatar kobuskc avatar babolivier avatar pesimon avatar redgeoff avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.