Skip to content

Instantly share code, notes, and snippets.

@ssudharsan
Created January 13, 2015 12:22
Show Gist options
  • Save ssudharsan/809e8f7401378bcea67b to your computer and use it in GitHub Desktop.
Save ssudharsan/809e8f7401378bcea67b to your computer and use it in GitHub Desktop.
#relay-rules.conf
[default]
default = true
DESTINATIONS = haproxy-relay:2015,haproxy-relay:2016
#carbon.conf
[relay:1]
USER = graphite
RELAY_METHOD = rules
DESTINATIONS = haproxy-relay:2015,haproxy-relay:2016
LINE_RECEIVER_INTERFACE = 0.0.0.0
LINE_RECEIVER_PORT = 2113
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
PICKLE_RECEIVER_PORT = 2114
MAX_DATAPOINTS_PER_MESSAGE = 500
MAX_QUEUE_SIZE = 10000
USE_FLOW_CONTROL = True
LOG_UPDATES = True
[relay:2]
USER = graphite
RELAY_METHOD = rules
DESTINATIONS = haproxy-relay:2015,haproxy-relay:2016
LINE_RECEIVER_INTERFACE = 0.0.0.0
LINE_RECEIVER_PORT = 2213
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
PICKLE_RECEIVER_PORT = 2214
MAX_DATAPOINTS_PER_MESSAGE = 500
MAX_QUEUE_SIZE = 10000
USE_FLOW_CONTROL = True
LOG_UPDATES = True
listen carbon_relay_2003 0.0.0.0:2003
balance leastconn
mode tcp
maxconn 1024
server relay1 relay1:2113 check maxconn 1024
server relay1 relay1:2213 check maxconn 1024
listen carbon_relay_2015 0.0.0.0:2015
#balance leastconn
mode tcp
maxconn 1024
server archive-relay1 archive-relay1:2113 check maxconn 1024
server archive-relay1 archive-relay1:2213 check maxconn 1024
# distribute across our replication carbon-relays
listen carbon_relay_2016 0.0.0.0:2016
#balance leastconn
mode tcp
maxconn 1024
server live-relay1 live-relay1:2113 check maxconn 1024
server live-relay1 live-relay1:2213 check maxconn 1024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment