Graphite-Kenshin is a plugin for using graphtie-api with Kenshin storage backend.
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.
Refer here to install kenshin and start two Rurouni-cache
instances.
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
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 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