{"id":13551249,"url":"https://github.com/gesellix/couchdb-prometheus-exporter","last_synced_at":"2025-07-12T03:37:53.622Z","repository":{"id":32062506,"uuid":"35634320","full_name":"gesellix/couchdb-prometheus-exporter","owner":"gesellix","description":"CouchDB stats exporter for Prometheus","archived":false,"fork":false,"pushed_at":"2024-04-10T18:20:32.000Z","size":4199,"stargazers_count":54,"open_issues_count":9,"forks_count":22,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T11:45:43.475Z","etag":null,"topics":["couchdb","exporter","hacktoberfest","prometheus"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gesellix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-14T20:11:02.000Z","updated_at":"2024-05-19T18:00:10.252Z","dependencies_parsed_at":"2023-09-25T01:52:03.078Z","dependency_job_id":"fccb2599-9c96-4ca8-a1d2-cb094a3ed47f","html_url":"https://github.com/gesellix/couchdb-prometheus-exporter","commit_stats":{"total_commits":410,"total_committers":12,"mean_commits":"34.166666666666664","dds":"0.40731707317073174","last_synced_commit":"ab01f113f07d3ca5b44d72b334cb079ef10202b9"},"previous_names":[],"tags_count":77,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesellix%2Fcouchdb-prometheus-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesellix%2Fcouchdb-prometheus-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesellix%2Fcouchdb-prometheus-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesellix%2Fcouchdb-prometheus-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gesellix","download_url":"https://codeload.github.com/gesellix/couchdb-prometheus-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835942,"owners_count":20355611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["couchdb","exporter","hacktoberfest","prometheus"],"created_at":"2024-08-01T12:01:44.938Z","updated_at":"2025-03-17T00:33:43.144Z","avatar_url":"https://github.com/gesellix.png","language":"Go","funding_links":[],"categories":["Go","hacktoberfest","Optimization and Monitoring"],"sub_categories":[],"readme":"# CouchDB Prometheus Exporter\n\n[![Build Status](https://travis-ci.org/gesellix/couchdb-prometheus-exporter.svg?branch=master)](https://travis-ci.org/gesellix/couchdb-prometheus-exporter)\n\n[CouchDB](http://couchdb.apache.org/) metrics exporter for [Prometheus](http://prometheus.io/)\n\nThe CouchDB metrics exporter requests the CouchDB stats from the `/_stats` and `/_active_tasks` endpoints and \nexposes them for Prometheus consumption. You can optionally monitor detailed database stats like\ndisk and data size to monitor the storage overhead. The exporter can be configured via program parameters,\nenvironment variables, and config file.\n\n## Build the binary\n\nYou can find pre-build releases for different platforms at [our GitHub Releases](https://github.com/gesellix/couchdb-prometheus-exporter/releases).\n\nIf you prefer to build your own binary or in case you'd like to build from the current `master`,\nyou'll have to get and install [a recent version of Golang](https://golang.org/dl/) for your platform, first.\nThen, you have to perform the following commands in the cloned repository:\n\n````shell script\ngo install github.com/gesellix/couchdb-prometheus-exporter/v30@v30.4.2\n````\n\nThose commands will install the binary in your local `GOBIN` directory, usually something like\n`$HOME/go/bin`. Please ensure that the directory is in your system's `PATH`. Then the following\nshould work:\n\n````shell script\ncouchdb-prometheus-exporter --help\n````\n\n## Run the binary\n\nYou can get an overview over possible configuration options with their defaults in the help screen:\n\n    couchdb-prometheus-exporter --help\n\nConfiguration is possible via:\n\n- environment variables (e.g. `COUCHDB_USERNAME=admin`)\n- command line parameters (e.g. `--couchdb.username admin`)\n- configuration file (e.g. `--config=config.ini`)\n\nThe configuration file format is the \"properties\" file format, e.g. like this:\n\n````properties\ncouchdb.username=admin\ncouchdb.password=a-secret\n````\n\n## Using TLS and/or Basic authentication\n\nTLS and/or Basic authentication is supported via `--web.config` parameter:\n\n    couchdb-prometheus-exporter --config=config.ini --web.config=web-config.yaml\n\nA complete `web-config.yml` might look like this:\n\n````yaml\n---\ntls_server_config :\n  cert_file : \"path/to/https/server.crt\"\n  key_file : \"path/to/https/server.key\"\nbasic_auth_users:\n  alice: $2y$12$1DpfPeqF9HzHJt.EWswy1exHluGfbhnn3yXhR7Xes6m3WJqFg0Wby\n  bob: $2y$18$4VeFDzXIoPHKnKTU3O3GH.N.vZu06CVqczYZ8WvfzrddFU6tGqjR.\n  carol: $2y$10$qRTBuFoULoYNA7AQ/F3ck.trZBPyjV64.oA4ZsSBCIWvXuvQlQTuu\n  dave: $2y$10$2UXri9cIDdgeKjBo4Rlpx.U3ZLDV8X1IxKmsfOvhcM5oXQt/mLmXq\n...\n````\n\nFor further information about TLS and/or Basic auth,\nplease visit: [exporter-toolkit/https](https://pkg.go.dev/github.com/prometheus/exporter-toolkit@v0.4.0/https)\nor [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit).\n\n## Run it as container\n\n    docker run --rm -p 9984:9984 gesellix/couchdb-prometheus-exporter --couchdb.uri=http://couchdb:5984\n\nPlease note that host names like `localhost` won't leave the container, so you have to use non-loopback\ndns names or ip addresses when configuring the CouchDB URI.\n\n## Logging\n\nThe couchdb-exporter uses the [slog](https://pkg.go.dev/golang.org/x/exp/slog) module for logging.\n\n## CouchDB 2+ clusters\n\nFor CouchDB 2.x, you should configure the exporter to fetch the stats from one node, to get\na complete cluster overview. In contrast to CouchDB 1.x you'll need to configure the admin\ncredentials, e.g. like this:\n\n    couchdb-prometheus-exporter --couchdb.uri=http://couchdb:5984 --couchdb.username=root --couchdb.password=a-secret\n\nIt is also possible to fetch the stats from a single node, using the scrape.localonly option, e.g. Like this:\n\n    couchdb-prometheus-exporter --couchdb.uri=http://couchdb:5984 --couchdb.username=root --couchdb.password=a-secret --scrape.localonly=true\n\n## Database disk usage stats\n\nIf you need database disk usage stats, add a comma separated list of database names like this:\n\n    couchdb-prometheus-exporter --couchdb.uri=http://couchdb:5984 --databases=db-1,db-2 --couchdb.username=root --couchdb.password=a-secret\n\nOr, if you want to get stats for every database, please use `_all_dbs` as database name:\n\n    couchdb-prometheus-exporter --couchdb.uri=http://couchdb:5984 --databases=_all_dbs --couchdb.username=root --couchdb.password=a-secret\n\n## Monitoring CouchDB with Prometheus, Grafana and Docker\n\nFor a step-by-step guide, see [Monitoring CouchDB with Prometheus, Grafana and Docker](https://medium.com/@redgeoff/monitoring-couchdb-with-prometheus-grafana-and-docker-4693bc8408f0)\n\nA complete example stack including multiple CouchDB instances, exporters, Prometheus, Grafana, etc. is available at `examples/grafana/`, and can be deployed locally:\n\n````bash\ncd examples/grafana\ndocker swarm init\ndocker stack deploy --compose-file docker-traefik-stack.yml example\n````\n\n## Examples\n\nThe `examples` directory in this repository contains ready-to-run examples for\n\n- [Docker Compose](examples/compose/README.md)\n- [Docker Swarm/Stack](examples/stack/README.md)\n\n## Credits\n\nThanks go to the Prometheus team, which is very active and responsive!\n\nI also have to admit that the couchdb-prometheus-exporter code is heavily inspired by \nthe other [available exporters](http://prometheus.io/docs/instrumenting/exporters/), \nand that some ideas have just been copied from them.\n\nLast but not least, this project wouldn't be possible without users submitting issues,\nfeature requests and adding [code contributions](https://github.com/gesellix/couchdb-prometheus-exporter/graphs/contributors).\nThanks a lot!\n\n## Metrics Overview\nThe file [README_metrics.md](https://github.com/gesellix/couchdb-prometheus-exporter/blob/master/README_metrics.md) gives you an overview on the currently exposed metrics.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgesellix%2Fcouchdb-prometheus-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgesellix%2Fcouchdb-prometheus-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgesellix%2Fcouchdb-prometheus-exporter/lists"}