forked from go-graphite/carbonapi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
carbonapi.example.yaml
122 lines (115 loc) · 4.45 KB
/
carbonapi.example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Need to be URL, http or https
# This url specifies the backend or a loadbalancer
#
# Is you are using carbonzipper you should set it to
# zipper's url
#
# If you are using plain go-carbon or graphite-clickhouse
# you should set it to URL of go-carbon's carbonserver module
# or graphite-clickhouse's http url.
# Listen address, should always include hostname or ip address and a port.
listen: "localhost:8081"
# Max concurrent requests to CarbonZipper
concurency: 20
cache:
# Type of caching. Valid: "mem", "memcache", "null"
type: "mem"
# Cache limit in megabytes
size_mb: 0
# Default cache timeout value. Identical to DEFAULT_CACHE_DURATION in graphite-web.
defaultTimeoutSec: 60
# Only used by memcache type of cache. List of memcache servers.
memcachedServers:
- "127.0.0.1:1234"
- "127.0.0.2:1235"
# Amount of CPUs to use. 0 - unlimited
cpus: 0
# Timezone, default - local
tz: ""
# If 'true', carbonapi will send requests as is, with globs and braces
# Otherwise for each request it will generate /metrics/find and then /render
# individual metrics.
# true --- faster, but will cause carbonzipper to consume much more RAM.
#
# For some backends (e.x. graphite-clickhouse) this *MUST* be set to true in order
# to get reasonable performance
#
# For go-carbon --- it depends on how you use it.
sendGlobsAsIs: false
# If sendGlobsAsIs is set and resulting response will be larger than maxBatchSize
# carbonapi will revert to old behavir. This allows you to use benifits of passing
# globs as is but keep memory usage in sane limits.
#
# For go-carbon you might want it to keep in some reasonable limits, 100 is good "safe" defaults
#
# For some backends (e.x. graphite-clickhouse) you might want to set it to some insanly high value, like 100000
maxBatchSize: 100
graphite:
# Host:port where to send internal metrics
# Empty = disabled
host: ""
interval: "60s"
prefix: "carbon.api"
# rules on how to construct metric name. For now only {prefix} and {fqdn} is supported.
# {prefix} will be replaced with the content of {prefix}
# {fqdn} will be repalced with fqdn
pattern: "{prefix}.{fqdn}"
# Maximium idle connections to carbonzipper
idleConnections: 10
pidFile: ""
# See https://github.com/go-graphite/carbonzipper/blob/master/example.conf#L70-L108 for format explanation
upstreams:
# Number of 100ms buckets to track request distribution in. Used to build
# 'carbon.zipper.hostname.requests_in_0ms_to_100ms' metric and friends.
# Requests beyond the last bucket are logged as slow
# (default of 10 implies "slow" is >1 second).
buckets: 10
timeouts:
# Maximum total backend requesting timeout in ms.
# ( How long we may spend making requests. )
global: "10s"
# Timeout, in ms, once the final backend has been contacted.
# ( [Effectively] How long we'll wait for the slowest response. )
afterStarted: "2s"
# Timeout to connect to the server
connect: "200ms"
# Number of concurrent requests to any given backend - default is no limit.
# If set, you likely want >= MaxIdleConnsPerHost
concurrencyLimit: 0
# Configures how often keep alive packets will be sent out
keepAliveInterval: "30s"
# Control http.MaxIdleConnsPerHost. Large values can lead to more idle
# connections on the backend servers which may bump into limits; tune with care.
maxIdleConnsPerHost: 100
# "http://host:port" array of instances of carbonserver stores
# This is the *ONLY* config element in this section that MUST be specified.
backends:
- "http://10.0.0.1:8080"
- "http://10.0.0.2:8080"
- "http://192.168.0.100:8080"
- "http://192.168.0.200:8080"
- "http://192.168.1.212:8080"
carbonsearch:
# Instance of carbonsearch backend
backend: "http://127.0.0.1:8070"
# carbonsearch prefix to reserve/register
prefix: "virt.v1.*"
# Enable compatibility with graphite-web 0.9
# This will affect graphite-web 1.0+ with multiple cluster_servers
# Default: disabled
graphite09compat: false
# If not zero, enabled cache for find requests
# This parameter controls when it will expire (in seconds)
# Default: 600 (10 minutes)
expireDelaySec: 10
logger:
- logger: ""
file: "stderr"
level: "debug"
encoding: "console"
encodingTime: "iso8601"
encodingDuration: "seconds"
- logger: ""
file: "carbonapi.log"
level: "info"
encoding: "json"