Skip to content

A plugin for using graphite-web with the kenshin-based storage backend.

License

Notifications You must be signed in to change notification settings

douban/graphite-kenshin

Repository files navigation

Graphite-Kenshin

Graphite-Kenshin is a plugin for using graphtie-api with Kenshin storage backend.

Graphite Cluster

Overview

Our graphite consists of three major components:

  • Graphite-API, Graphite-API is an alternative to Graphite-web, without any built-in dashboard. Its role is solely to fetch metrics from a time-series database (whisper, cyanite, etc.) and rendering graphs or JSON data out of these time series. It is meant to be consumed by any of the numerous Graphite dashboard applications.
  • Kenshin, A time-series database alternative to Graphite Whisper with 40x improvement in IOPS.
    • Rurouni-cache, Metric processing daemon.
    • Kenshin, Time-series database library.
  • carbon-c-realy, Enhanced C implementation of Carbon relay, aggregator and rewriter.

Install a demo cluster

Kenshin

Refer here to install kenshin and start two Rurouni-cache instances.

Graphite-Kenshin & Graphite-API

Install

$ git clone https://github.com/douban/graphite-kenshin.git
$ cd graphite-kenshin
$ GraphiteKenshinVenv=<venv_of_kenshin> make install

Start Graphite-API

$ export GRAPHITE_API_CONFIG=<path/to/graphite-kenshin>/conf/graphite-api.yaml
$ # update graphite-api.yaml
$ gunicorn -w2 graphite_api.app:app -b 127.0.0.1:8888

carbon-c-relay

Build carbon-c-relay:

$ git clone https://github.com/douban/carbon-c-relay.git
$ cd carbon-c-relay
$ make

Start carbon-c-realy:

$ cd graphite-kenshin
$ /path/to/relay -p 2001 -f ./conf/relay.conf -S 1 -H relay_0

Send & Query metrics

Send metrics to carbon-c-relay

$ cd <directory_of_kenshin>
$ python examples/metric_stresser.py -a 127.0.0.1:2001 -f line -p 10 -m 100 -i 10

Query metrics through Graphite-API

http://127.0.0.1:8888/render?target=metric_stresser.process_*.metric_id.0&width=1200&height=600&from=-10min

Contributors