1# You can use either 'yaml' or 'toml' as a config format 2# Please note, that only 'yaml' example config guaranteed to be up to date 3# And only 'carbonapi.example.yaml' have comments about all available parameters 4# This file is autoconverted from 'yaml'. 5concurency = 1000 6cpus = 0 7expireDelaySec = 10 8idleConnections = 10 9listen = "localhost:8081" 10pidFile = "" 11tz = "" 12graphTemplates = "/usr/local/etc/carbonapi/graphTemplates.example.toml" 13 14[cache] 15defaultTimeoutSec = 60 16memcachedServers = ["127.0.0.1:1234", "127.0.0.2:1235"] 17size_mb = 0 18type = "mem" 19 20[functionsConfig] 21graphiteWeb = "graphiteWeb.example.yaml" 22 23[graphite] 24host = "" 25interval = "60s" 26pattern = "{prefix}.{fqdn}" 27prefix = "carbon.api" 28 29[[logger]] 30encoding = "console" 31encodingDuration = "seconds" 32encodingTime = "iso8601" 33file = "stderr" 34level = "debug" 35logger = "" 36 37[[logger]] 38encoding = "json" 39file = "/var/log/carbonapi/carbonapi.log" 40level = "info" 41logger = "" 42 43# Uncomment this to get the behavior of graphite-web as proposed in https://github.com/graphite-project/graphite-web/pull/2239 44# Beware this will make darkbackground graphs less readable 45#[defaultColors] 46#red = "ff0000" 47#green = "00ff00" 48#blue = "#0000ff" 49#darkred = "#c80032" 50#darkgreen = "00c800" 51#darkblue = "002173" 52 53[upstreams] 54backends = ["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"] 55buckets = 10 56concurrencyLimit = 0 57graphite09compat = false 58keepAliveInterval = "30s" 59maxIdleConnsPerHost = 100 60 61# if upstream.backends specified, it will be used instead 62[[upstreams.backendsv2.backends]] 63groupName = "group1" 64# supported: 65# carbonapi_v2_pb - carbonapi 0.11 or earlier version of protocol. 66# carbonapi_v3_pb - new protocol, http interface (native) 67# carbonapi_v3_grpc - new protocol, gRPC interface (native) 68# protobuf, pb, pb3 - same as carbonapi_v2_pb 69# msgpack - protocol used by graphite-web 1.1 and metrictank 70# auto - carbonapi will do it's best to guess if it's carbonapi_v3_pb or carbonapi_v2_pb 71# 72# non-native protocols will be internally converted to new protocol, which will increase memory consumption 73protocol = "carbonapi_v2_pb" 74# supported: 75# "broadcast" - send request to all backends in group and merge responses. This was default behavior for carbonapi 0.11 or earlier 76# "roundrobin" - send request to one backend. 77# "all - same as "broadcast" 78# "rr" - same as "roundrobin" 79lbMethod = "broadcast" 80# amount of retries in case of unsuccessful request 81maxTries = 3 82# amount of metrics per fetch request. Default: 0 - unlimited. If not specified, global will be used 83# interval for keep-alive http packets. If not specified, global will be used 84keepAliveInterval = "10s" 85# override for global concurrencyLimit. 86concurrencyLimit = 0 87# override for global maxIdleConnsPerHost 88maxIdleConnsPerHost = 1000 89# per-group timeout override. If not specified, global will be used. 90# Please note that ONLY min(global, local) will be used. 91 [timeouts] 92 # Maximum backend request time for find requests. 93 find = "2s" 94 # Maximum backend request time for render requests. This is total one and doesn't take into account in-flight requests. 95 render = "50s" 96 # Timeout to connect to the server 97 connect = "200ms" 98servers = ["http://127.0.0.2:8080", "http://127.0.0.3:8080"] 99 100[[upstreams.backendsv2.backends]] 101groupName = "group2" 102protocol = "carbonapi_v3_pb" 103lbMethod = "roundrobin" 104servers = ["http://127.0.0.4:8080", "http://127.0.0.5:8080"] 105 106[upstreams.carbonsearch] 107backend = "http://127.0.0.1:8070" 108prefix = "virt.v1.*" 109 110[upstreams.carbonsearchv2] 111# carbonsearch prefix to reserve/register 112prefix = "virt.v1.*" 113# Carbonsearch instances. Follows the same syntax as backendsv2 114 [[backends]] 115 groupName = "group1" 116 protocol = "carbonapi_v2_pb" 117 lbMethod = "broadcast" 118 servers = ["http://127.0.0.4:8080", "http://127.0.0.5:8080"] 119 120[upstreams.timeouts] 121afterStarted = "2s" 122connect = "200ms" 123global = "10s" 124