Skip to content

bugzmanov/graphite-to-elastic-relay

Repository files navigation

Graphite to ElasticSearch data relay

Simple tool to transfer metrics data from graphite to elastic-search. Intended for migration purposes

image

Build & Run

Build

git clone https://github.com/bugzmanov/graphite-to-elastic-relay.git
cd graphite-to-elastic-relay
make build

Run

Without docker

Using environment variables

java -DGRAPHITE_URL="http://localhost:80/graphite" -DELASTIC_URL="http://elasticsearch:9200" \
     -DMETRICS_INDEX=metric -DGRAPHITE_METRICS="[\"stats_counts.statsd.*\" \"*.agents.*.*\"]" \
     -jar target/uberjar/graphite-to-elastic-relay.jar

Using configuration file:

See config file example

java -Dconfig="relay-config.edn" -jar target/uberjar/graphite-to-elastic-relay.jar

Using docker

Build:

make publish

Run:

docker run -e GRAPHITE_URL="http://graphite:80" -e ELASTIC_URL="http://elasticsearch:9200" \
       -e METRICS_INDEX=xmetrix -e GRAPHITE_METRICS="[\"stats_counts.statsd.*\" \"*.agents.*.*\"]" \
        bugzmanov/graphite-elastic-relay:0.1 

Build custom docker image with config:

FROM bugzmanov/graphite-elastic-relay:0.1
COPY custom-config.edn /opt/relay-config.edn

Quick demo

Prerequisites:

  • docker
  • docker-compose
make run-demo

Clean up:

make clean

docker-compose definition: https://github.com/bugzmanov/graphite-to-elastic-relay/blob/master/demo/docker-compose.yml

About

Metric data relay from graphite to elastic-search

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published