Coder Social home page Coder Social logo

nlnwa / rethinkdb_exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oliver006/rethinkdb_exporter

0.0 7.0 0.0 1.07 MB

Prometheus exporter for RethinkDB cluster and table metrics. Supports RethinkDB 2.x

Dockerfile 3.37% Smarty 6.23% Go 90.40%

rethinkdb_exporter's Introduction

RethinkDB Prometheus Metrics Exporter

Prometheus exporter for RethinkDB cluster, server and table metrics.
Supports RethinkDB 2.x

Building and running

Locally build and run:

    $ git clone https://github.com/nlnwa/rethinkdb_exporter.git
    $ cd rethinkdb_exporter
    $ go build
    $ ./rethinkdb_exporter <flags>

Or via docker:

    $ docker pull norsknettarkiv/rethinkdb_exporter
    $ docker run -d --name rethinkdb_exporter -p 9123:9123 norsknettarkiv/rethinkdb_exporter

Deploying

A Helm chart is included under helm/ for installing the rethinkdb_exporter on Kubernetes clusters. You'll need one of these per RethinkDB cluster you run.

Installing it is as simple as:

$ cd helm/rethinkdb-exporter
$ helm install \
    --name=rethinkdb-exporter-for-clustername  \
    --set=rethinkdb_exporter.db.addr=my-rethinkdb-server:28015  \
    --set=rethinkdb_exporter.db.password=mypassword  \
    --set=rethinkdb_exporter.clustername=myclustername  \
    .

Flags

Name Description
db.addr Address of one or more nodes of the cluster, comma separated.
db.auth Auth key of the RethinkDB cluster (for versions < 2.3)
db.user Username for RethinkDB connection (for versions >= 2.3) (must be admin if used; see below)
db.pass Password for RethinkDB connection (for versions >= 2.3)
db.count-rows Count rows per table, turn off if you experience perf. issues with large tables
db.table-stats Get stats for all tables.
clustername Name of the cluster, if set it's added as a label to the metrics.
namespace Namespace for the metrics, defaults to "rethinkdb".
web.listen-address Address to listen on for web interface and telemetry, default :9123
web.telemetry-path Path under which to expose metrics.

What's exported?

All entries from the stats table of the internal database rethinkdb are exported, see http://rethinkdb.com/docs/system-stats/ for details.
In addition, for every table there is a gauge with the number of items of said table.
Metric name is rethinkdb_table_items_total{db="...",table="..."} There are also total counters for numer of servers, tables and replicas as well as number of errors returned from the stats table.
Metric names are rethinkdb_cluster_[servers|server_errors|tables|replicas]_total

What does it look like?

Grafana dashboard is available here:
rethink_exporter_dashboard

v2.3+ Auth

In v2.3 RethinkDB moved to a username/password authentication system. For compatibility with this use the --db.user and --db.pass options.

It would be good to use a dedicated read-only user for this but the RethinkDB docs say "the jobs table can only be accessed by the admin user account". Thus you'll have to use --db.user=admin.

What else?

Things that can/should be added

  • status metrics per shard
  • ...

Open an issue or PR if you have more suggestions or ideas about what to add.

rethinkdb_exporter's People

Contributors

oliver006 avatar maeb avatar alexmbird avatar danielheckrath avatar klatys avatar

Watchers

Thomas Langvann avatar James Cloos avatar John Erik Halse avatar  avatar  avatar Andreas Børsheim avatar  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.