Simple tool to transfer metrics data from graphite to elastic-search. Intended for migration purposes
git clone https://github.com/bugzmanov/graphite-to-elastic-relay.git
cd graphite-to-elastic-relay
make build
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
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
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