From d40cd6d79ca57efc1700dae82f129e1a4155b85e Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Thu, 7 Jul 2016 21:20:45 +0200 Subject: [PATCH] Add graphite api image :( --- Carbon.dockerfile | 3 +++ configs/brubeck.json | 8 ++++---- configs/graphite-api.yml | 10 ++++++++++ docker-compose.yml | 27 ++++++++++++++++++++++++--- 4 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 configs/graphite-api.yml diff --git a/Carbon.dockerfile b/Carbon.dockerfile index 1b54216..2917337 100644 --- a/Carbon.dockerfile +++ b/Carbon.dockerfile @@ -14,6 +14,9 @@ WORKDIR /build/go-carbon RUN git checkout v0.7.2 RUN make submodules && make +RUN mkdir /graphite-config +COPY configs/graphite-api.yml /graphite-config/graphite-api.yml + COPY configs/carbon.toml /etc/carbon.toml COPY configs/storage-schemas.conf /etc/storage-schemas.conf EXPOSE 2003 2004 7002 diff --git a/configs/brubeck.json b/configs/brubeck.json index 92e75dd..215646c 100644 --- a/configs/brubeck.json +++ b/configs/brubeck.json @@ -4,13 +4,13 @@ "dumpfile": "./brubeck.dump", "capacity": 15, "expire": 20, - "http": ":8080", + "http": ":8090", "backends": [ { "type": "carbon", - "address": "localhost", + "address": "carbon", "port": 2003, - "frequency": 10 + "frequency": 5 } ], "samplers": [ @@ -19,7 +19,7 @@ "address": "0.0.0.0", "port": 8126, "workers": 4, - "multisock": true, + "multisock": false, "multimsg": 8 }, { diff --git a/configs/graphite-api.yml b/configs/graphite-api.yml new file mode 100644 index 0000000..1986988 --- /dev/null +++ b/configs/graphite-api.yml @@ -0,0 +1,10 @@ +search_index: /srv/graphite/index +finders: + - graphite_api.finders.whisper.WhisperFinder +functions: + - graphite_api.functions.SeriesFunctions + - graphite_api.functions.PieFunctions +whisper: + directories: + - /data/graphite/whisper +time_zone: UTC diff --git a/docker-compose.yml b/docker-compose.yml index 9995899..7f58d07 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,7 @@ version: '2' services: + # Go Carbon (Carbon replacement) + # Takes care of writing metrics to database and data retention carbon: image: carbon:v1 build: @@ -11,6 +13,9 @@ services: - '7002:7002' volumes: - /data/graphite/whisper + - /graphite-config + # Brubeck (StatsD replacement) + # Aggregates metrics before sending them to Carbon brubeck: image: brubeck:v1 build: @@ -22,6 +27,24 @@ services: - '9126:9126' depends_on: - carbon + # Graphite API (yep, almost original Graphite Web) + # Provides API for reading metrics + graphite-api: + image: brutasse/graphite-api:latest + build: + context: https://github.com/brutasse/graphite-api.git + environment: + BIND_ADDRESS: 0.0.0.0 + PORT: 8000 + GRAPHITE_API_CONFIG: /graphite-config/graphite-api.yml + ports: + - '8080:8000' + volumes_from: + - carbon + depends_on: + - carbon + # Grafana + # Metrics dashboard grafana: image: grafana:v1 build: @@ -30,6 +53,4 @@ services: ports: - '3000:3000' depends_on: - - carbon - - brubeck - + - graphite-api