Skip to main content
Version: v0.21

RethinkDB Prometheus exporter

GitHub tag GoDoc Build status

RethinkDB statistics exporter for Prometheus.

Current version: v1.0.1 (RethinkDB v2.4)

Build and Run​

Local build and run:

git clone https://github.com/rethinkdb/prometheus-exporter.git
cd prometheus-exporter
go build -o rethinkdb-exporter
./rethinkdb-exporter

Docker build and run:

git clone https://github.com/rethinkdb/prometheus-exporter.git
cd prometheus-exporter
docker build --tag rethinkdb-exporter .
docker run -d -p 9050:9050 rethinkdb-exporter

Parameters​

Exporter can get parameters from config file, CLI flags or Environment variables.

CLI flagEnv var nameConfig keyDescription
--config--Config file (default to prometheus-exporter.yaml)
--web.listen-address stringWEB_LISTEN_ADDRESSweb.listen_addressAddress to listen on for web interface and telemetry (default "0.0.0.0:9055")
--web.telemetry-path stringWEB_TELEMETRY_PATHweb.telemetry_pathPath under which to expose metrics (default "/metrics")
--db.addressDB_ADDRESSESdb.rethinkdb_addressesAddress of one or more nodes of rethinkdb (default [localhost:28015])
--db.enable-tlsDB_ENABLE_TLSdb.enable_tlsEnable to use tls connection
--db.caDB_CAdb.ca_filePath to CA certificate file for tls connection
--db.certDB_CERTdb.certificate_filePath to certificate file for tls connection
--db.keyDB_KEYdb.key_filePath to key file for tls connection
--db.usernameDB_USERNAMEdb.usernameUsername of rethinkdb user
--db.passwordDB_PASSWORDdb.passwordPassword of rethinkdb user
--db.pool-sizeDB_POOL_SIZEdb.connection_pool_sizeSize of connection pool to rethinkdb (default 5)
--log.debugLOG_DEBUGlog.debugVerbose debug logs
--log.json-outputLOG_JSON_OUTPUTlog.json_outputUse JSON output for logs
--stats.table-estimatesSTATS_TABLE_ESTIMATESstats.table_docs_estimatesCollect docs count estimates for each table

Config file can be yaml or json. Example:

web:
listen_address: "0.0.0.0:9050"
db:
rethinkdb_addresses:
- "0.0.0.0:28015"
- "0.0.0.0:28016"
stats:
table_docs_estimates: true

Metrics​

Most of the RethinkDB stats table are exported.

Optionally table rows count estimates can be exported from Table info.

Grafana dashboard​

Grafana can be found here.

image

Contribution​

Pull requests and issues are welcome.