1
0
Fork 0

Add graphite api image :(

This commit is contained in:
Gregory Eremin 2016-07-07 21:20:45 +02:00
parent 4ed8fe0d58
commit d40cd6d79c
4 changed files with 41 additions and 7 deletions

View File

@ -14,6 +14,9 @@ WORKDIR /build/go-carbon
RUN git checkout v0.7.2 RUN git checkout v0.7.2
RUN make submodules && make 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/carbon.toml /etc/carbon.toml
COPY configs/storage-schemas.conf /etc/storage-schemas.conf COPY configs/storage-schemas.conf /etc/storage-schemas.conf
EXPOSE 2003 2004 7002 EXPOSE 2003 2004 7002

View File

@ -4,13 +4,13 @@
"dumpfile": "./brubeck.dump", "dumpfile": "./brubeck.dump",
"capacity": 15, "capacity": 15,
"expire": 20, "expire": 20,
"http": ":8080", "http": ":8090",
"backends": [ "backends": [
{ {
"type": "carbon", "type": "carbon",
"address": "localhost", "address": "carbon",
"port": 2003, "port": 2003,
"frequency": 10 "frequency": 5
} }
], ],
"samplers": [ "samplers": [
@ -19,7 +19,7 @@
"address": "0.0.0.0", "address": "0.0.0.0",
"port": 8126, "port": 8126,
"workers": 4, "workers": 4,
"multisock": true, "multisock": false,
"multimsg": 8 "multimsg": 8
}, },
{ {

10
configs/graphite-api.yml Normal file
View File

@ -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

View File

@ -1,5 +1,7 @@
version: '2' version: '2'
services: services:
# Go Carbon (Carbon replacement)
# Takes care of writing metrics to database and data retention
carbon: carbon:
image: carbon:v1 image: carbon:v1
build: build:
@ -11,6 +13,9 @@ services:
- '7002:7002' - '7002:7002'
volumes: volumes:
- /data/graphite/whisper - /data/graphite/whisper
- /graphite-config
# Brubeck (StatsD replacement)
# Aggregates metrics before sending them to Carbon
brubeck: brubeck:
image: brubeck:v1 image: brubeck:v1
build: build:
@ -22,6 +27,24 @@ services:
- '9126:9126' - '9126:9126'
depends_on: depends_on:
- carbon - 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: grafana:
image: grafana:v1 image: grafana:v1
build: build:
@ -30,6 +53,4 @@ services:
ports: ports:
- '3000:3000' - '3000:3000'
depends_on: depends_on:
- carbon - graphite-api
- brubeck