github.com/go-graphite/carbonapi@v0.17.0/cmd/carbonapi/carbonapi.example.toml (about)

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