forked from go-graphite/carbonzipper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.conf
144 lines (129 loc) · 5.13 KB
/
example.conf
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
listen: ":8080"
maxProcs: 0
graphite:
host: "localhost:2003"
interval: "60s"
prefix: "carbon.zipper"
# defines pattern of metric name. If present, {prefix} will be replaced with content of "prefix", {fqdn} with fqdn
pattern: "{prefix}.{fqdn}"
# 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. )
render: "10s"
# Timeout, in ms, once the final backend has been contacted.
# ( [Effectively] How long we'll wait for the slowest response. )
find: "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
# If not zero, enabled cache for find requests
# This parameter controls when it will expire (in seconds)
# Default: 600 (10 minutes)
expireDelaySec: 10
# Old backend format. Please migrate to backendv2
# "http://host:port" array of instances of carbonserver stores
# This is the *ONLY* config element 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.0.101:8080"
- "http://192.168.0.201:8080"
# New backend format. Will be used ONLY if 'backends' section is empty
backendsv2:
backends:
-
groupName: "some-broadcast"
# supported:
# carbonapi_v3_grpc
# carbonapi_v3_pb - new fancy protocol
# carbonapi_v2_pb - old familiar one. Synonyms: protobuf, protobuf3
# msgpack - graphite-web 1.1 format. Compatible with metrictank
# auto - carbonzipper will do it's bet to guess what to use (it will query /_interal/capabilities URL and if there won't be an answer there it will think that it's carbonapi_v2_pb. Mixed backends are allowed.
protocol: "auto"
lbMethod: "broadcast" # supported: broadcast (all), roundrobin (rr, any)
servers:
- "http://10.0.0.1:8080"
- "http://10.0.0.2:8080"
-
groupName: "other-roundrobin-group"
protocol: "protobuf"
lbMethod: "roundrobin"
servers:
- "http://192.168.0.100:8080"
- "http://192.168.0.200:8080"
-
groupName: "other-roundrobin-group-with-timeouts"
protocol: "protobuf"
lbMethod: "roundrobin"
concurrencyLimit: 500 # This will override group's concurencyLimit. It make sense to make it lower than global if you know your backend might be overloaded
timeouts:
render: "30s"
find: "500ms"
connect: "250ms"
servers:
- "http://192.168.0.101:8080"
- "http://192.168.0.201: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
# Configuration for the logger
# It's possible to specify multiple logger outputs with different loglevels and encodings
# Logger is logrotate-compatible, you can freely move or rename or delete files, it will create
# new one automatically
logger:
-
# Available Loggers:
# "" - global for all
# "main" - what's before start
# "find" - for find handler
# "info" - for info handler
# "loadbalancer" - for lb handler
# "probe" - for background probes
# "render" - for render handler
# "slow" - slow query log ("Slow reuqest" messages)
# "access" - access logs (requests, times, etc)
# Please note that if you want to have all logs going to stdout and access logs going to file, you need to define 2 sections for access logger (file + stdout) + one section for logger ""
logger: ""
# "/some/file"
# "stderr"
# "stdout"
# "" (=="stderr")
# "none"
# default: "stdout"
file: "stderr"
# "debug", "info", "warn", "error", "fatal", "panic" are available
# default: info
level: "debug"
# "json", "mixed" or "console", default: console
encoding: "console"
# Time format (for timestamps in the logs), default: iso8601
# Available: "millis", "nanos", "epoch", "iso8601"
encodingTime: "iso8601"
# Format to encode durations, default: seconds.
# Available: "seconds", "nanos", "string"
encodingDuration: "seconds"
-
logger: ""
file: "carbonapi.log"
level: "info"
encoding: "json"