Sign inSign up

blakelead/couchbase-exporter

By blakelead

Updated over 6 years ago

Prometheus exporter for Couchbase Server.

Image
0

1M+

blakelead/couchbase-exporter repository overview

Couchbase Exporter

Build Status Software License

Expose metrics from Couchbase server for consumption by Prometheus.

Go to Github page for more informations.

Getting Started

$ docker run --name cbexporter -p 9191:9191 blakelead/couchbase-exporter:latest

Environment variables

namedescriptiondefault
CB_EXPORTER_LISTEN_ADDRAddress to listen on for HTTP requests127.0.0.1:9191
CB_EXPORTER_TELEMETRY_PATHPath under which to expose metrics/metrics
CB_EXPORTER_SERVER_TIMEOUTServer read timeout in seconds10s
CB_EXPORTER_DB_URIAddress of Couchbase clusterhttp://127.0.0.1:8091
CB_EXPORTER_DB_TIMEOUTCouchbase client timeout in seconds10s
CB_EXPORTER_DB_USERAdministrator usernameadmin
CB_EXPORTER_DB_PASSWORDAdministrator passwordpassword
CB_EXPORTER_LOG_LEVELLog level: info,debug,warn,error,fatalinfo
CB_EXPORTER_LOG_FORMATLog format: text, jsontext
CB_EXPORTER_SCRAPE_CLUSTERIf false, wont scrape cluster metricstrue
CB_EXPORTER_SCRAPE_NODEIf false, wont scrape node metricstrue
CB_EXPORTER_SCRAPE_BUCKETIf false, wont scrape bucket metricstrue
CB_EXPORTER_SCRAPE_XDCRIf false, wont scrape XDCR metricstrue

Full example:

## run docker container
$ docker run --name cbexporter \
                     --publish 9191:9191 \
                     --env CB_EXPORTER_LISTEN_ADDR=:9191 \
                     --env CB_EXPORTER_TELEMETRY_PATH=/metrics \
                     --env CB_EXPORTER_SERVER_TIMEOUT=10s \
                     --env CB_EXPORTER_LOG_LEVEL=debug \
                     --env CB_EXPORTER_LOG_FORMAT=json \
                     --env CB_EXPORTER_DB_URI=http://cb.local:8091 \
                     --env CB_EXPORTER_DB_TIMEOUT=10s \
                     --env CB_EXPORTER_DB_USER=admin \
                     --env CB_EXPORTER_DB_PASSWORD=password \
                     --env CB_EXPORTER_SCRAPE_CLUSTER=true \
                     --env CB_EXPORTER_SCRAPE_NODE=true \
                     --env CB_EXPORTER_SCRAPE_BUCKET=false \
                     --env CB_EXPORTER_SCRAPE_XDCR=false \
                     blakelead/couchbase-exporter:latest

## get metrics
$ curl http://localhost:9191/metrics
# HELP cb_cluster_balanced Status of cluster balance
# TYPE cb_cluster_balanced gauge
cb_cluster_balanced 1
# HELP cb_cluster_data_ram_quota_bytes Memory quota allocated to Data buckets
# TYPE cb_cluster_data_ram_quota_bytes gauge
cb_cluster_data_ram_quota_bytes 2.147483648e+09
# HELP cb_cluster_disk_free_bytes Free disk space in the cluster
# TYPE cb_cluster_disk_free_bytes gauge
cb_cluster_disk_free_bytes 5.7707573904e+10
# HELP cb_cluster_disk_quota_total_bytes Disk space quota for the cluster
# TYPE cb_cluster_disk_quota_total_bytes gauge
cb_cluster_disk_quota_total_bytes 6.2725623808e+10
...
...

Metrics

For a complete list of metrics, please go to the Github page.

Tag summary

Content type

Image

Digest

Size

8.7 MB

Last updated

over 6 years ago

docker pull blakelead/couchbase-exporter