1
0
Fork 0

Initial commit (carbon is set up)

This commit is contained in:
Gregory Eremin 2016-07-06 20:50:23 +02:00
commit e498db649a
No known key found for this signature in database
GPG Key ID: 5EFA427EEC26E86C
3 changed files with 90 additions and 0 deletions

16
Dockerfile-carbon Normal file
View File

@ -0,0 +1,16 @@
FROM ubuntu:14.04
MAINTAINER Gregory Eremin <g@erem.in>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y make git golang
RUN mkdir /build
RUN cd /build && git clone https://github.com/lomik/go-carbon.git
WORKDIR /build/go-carbon
RUN git checkout v0.7.2
RUN make submodules && make
COPY configs/carbon.toml /etc/carbon.toml
COPY configs/storage-schemas.conf /etc/storage-schemas.conf
RUN mkdir -p /data/graphite/whisper
ENTRYPOINT ./go-carbon -config=/etc/carbon.toml

59
configs/carbon.toml Normal file
View File

@ -0,0 +1,59 @@
[common]
# If logfile is empty use stderr
logfile = ""
# Logging error level. Valid values: "debug", "info", "warn", "warning", "error"
log-level = "info"
# Prefix for store all internal go-carbon graphs. Supported macroses: {host}
graph-prefix = "carbon.agents.{host}."
# Interval of storing internal metrics. Like CARBON_METRIC_INTERVAL
metric-interval = "1m0s"
# Increase for configuration with multi persisters
max-cpu = 1
[whisper]
data-dir = "/data/graphite/whisper/"
# http://graphite.readthedocs.org/en/latest/config-carbon.html#storage-schemas-conf. Required
schemas-file = "/etc/storage-schemas.conf"
# http://graphite.readthedocs.org/en/latest/config-carbon.html#storage-aggregation-conf. Optional
aggregation-file = ""
# Workers count. Metrics sharded by "crc32(metricName) % workers"
workers = 1
# Limits the number of whisper update_many() calls per second. 0 - no limit
max-updates-per-second = 0
# Sparse file creation
sparse-create = false
enabled = true
[cache]
# Limit of in-memory stored points (not metrics)
max-size = 1000000
# Capacity of queue between receivers and cache
input-buffer = 51200
[udp]
listen = ":2003"
enabled = true
# Enable optional logging of incomplete messages (chunked by MTU)
log-incomplete = false
[tcp]
listen = ":2003"
enabled = true
[pickle]
listen = ":2004"
enabled = false
# Limit message size for prevent memory overflow
max-message-size = 67108864
[carbonlink]
listen = "127.0.0.1:7002"
enabled = true
# Close inactive connections after "read-timeout"
read-timeout = "30s"
# Return empty result if cache not reply
query-timeout = "100ms"
[pprof]
listen = "localhost:7007"
enabled = false

View File

@ -0,0 +1,15 @@
# Documentation
# http://graphite.readthedocs.io/en/latest/config-carbon.html#storage-schemas-conf
# Carbon metrics are kept for 30 days in resolution of 10 seconds.
[carbon]
pattern = ^carbon\.
retentions = 10s:30d
# User metrics are kept for:
# * 24 hours in resolution of 5 seconds
# * 30 days in resolution of 1 minute
# * 1 year in resolution of 5 minutes
[user]
pattern = .*
retentions = 5s:24h,1m:30d,5m:1y