Skip to content

Instantly share code, notes, and snippets.

@zerosoul13
Created November 11, 2021 17:27

Revisions

  1. zerosoul13 created this gist Nov 11, 2021.
    54 changes: 54 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,54 @@
    instance = "%HOST%"
    max_procs = 8 # original value is 4
    admin_addr = "0.0.0.0:2004"
    http_addr = "0.0.0.0:8081"
    spool_dir = "/var/spool/%HOST%"
    pid_file = "/home/relay/carbon-relay-ng.pid"

    # one of critical error warning notice info debug
    log_level = "info"

    ## Validation of inputs ##
    # Metric name validation strictness for legacy metrics. Valid values are:
    # strict - Block anything that can upset graphite: valid characters are [A-Za-z0-9_-.]; consecutive dots are not allowed
    # medium - Valid characters are ASCII; no embedded NULLs
    # none - No validation is performed
    validation_level_legacy = "medium"

    # Metric validation for carbon2.0 (metrics2.0) metrics.
    # Metrics that contain = or _is_ are assumed carbon2.0.
    # Valid values are:
    # medium - checks for unit and mtype tag, presence of another tag, and constency (use = or _is_, not both)
    # none - No validation is performed
    validation_level_m20 = "medium"

    # you can also validate that each series has increasing timestamps
    validate_order = false

    # How long to keep track of invalid metrics seen
    # Useful time units are "s", "m", "h"
    bad_metrics_max_age = "6h"

    ## Inputs ##
    ### plaintext Carbon ###
    listen_addr = "0.0.0.0:2003"
    plain_read_timeout = "2m"

    ### Pickle Carbon ###
    pickle_addr = "0.0.0.0:2014"
    pickle_read_timeout = "2m"

    [[route]]
    key='default'
    type = 'consistentHashing'
    destinations = ['go-carbon-0.go-carbon.graphite:2004 spool=true pickle=true','go-carbon-1.go-carbon.graphite:2004 spool=true pickle=true','go-carbon-2.go-carbon.graphite:2004 spool=true pickle=true','go-carbon-3.go-carbon.graphite:2004 spool=true pickle=true','go-carbon-4.go-carbon.graphite:2004 spool=true pickle=true','go-carbon-5.go-carbon.graphite:2004 spool=true pickle=true']
    schemasFile = '/conf/storage-schemas.conf'

    [instrumentation]
    # in addition to serving internal metrics via expvar, you can send them to graphite/carbon
    # IMPORTANT: setting this to "" will disable flushing, and metrics will pile up and lead to OOM
    # see https://github.com/graphite-ng/carbon-relay-ng/issues/50
    # so for now you MUST send them somewhere. sorry.
    # (Also, the interval here must correspond to your setting in storage-schemas.conf if you use grafana hosted metrics)
    graphite_addr = "0.0.0.0:2003"
    graphite_interval = 60000 # in ms