← Back to team overview

graphite-dev team mailing list archive

Re: [Question #260610]: How to use carbon-relay to replicate metrics across graphite clusters

 

Question #260610 on Graphite changed:
https://answers.launchpad.net/graphite/+question/260610

Description changed to:
I am using statsd to send in metrics to our cluster, I want replicate data to 2 graphite clusters, I have haproxy which which send the data to the carbon relay and the carbon relay using "rules" method sends the data to the graphite cluster A and B via haproxy. 
problem is I am unable to get it working with this setup but if try to create a single cluster without relay it is working fine. I have attached the configs.  please help.



						                ----->  Graphite A
						              /
						             /   |.........<....|
statsd proxy -> statsd -> haproxy -> carbon relay
						               \   |........<....|
						                \
							          ----> Graphite B
								   


#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


#HAPROXY 

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

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.