Skip to content

isard-vdi/rethinkdb-prometheus-exporter

 
 

Repository files navigation

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 flag Env var name Config key Description
--config - - Config file (default to prometheus-exporter.yaml)
--web.listen-address string WEB_LISTEN_ADDRESS web.listen_address Address to listen on for web interface and telemetry (default "0.0.0.0:9055")
--web.telemetry-path string WEB_TELEMETRY_PATH web.telemetry_path Path under which to expose metrics (default "/metrics")
--db.address DB_ADDRESSES db.rethinkdb_addresses Address of one or more nodes of rethinkdb (default [localhost:28015])
--db.enable-tls DB_ENABLE_TLS db.enable_tls Enable to use tls connection
--db.ca DB_CA db.ca_file Path to CA certificate file for tls connection
--db.cert DB_CERT db.certificate_file Path to certificate file for tls connection
--db.key DB_KEY db.key_file Path to key file for tls connection
--db.username DB_USERNAME db.username Username of rethinkdb user
--db.password DB_PASSWORD db.password Password of rethinkdb user
--db.pool-size DB_POOL_SIZE db.connection_pool_size Size of connection pool to rethinkdb (default 5)
--log.debug LOG_DEBUG log.debug Verbose debug logs
--log.json-output LOG_JSON_OUTPUT log.json_output Use JSON output for logs
--stats.table-estimates STATS_TABLE_ESTIMATES stats.table_docs_estimates Collect 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.

About

Prometheus rethinkdb statistics exporter

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.6%
  • Dockerfile 1.3%
  • Makefile 1.1%