Name: graphite-sink
Owner: Datadog, Inc.
Description: null
Created: 2017-11-15 01:16:38.0
Updated: 2018-02-20 17:22:57.0
Pushed: 2017-11-15 01:23:23.0
Homepage: null
Size: 5
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This configures a single endpoint and is suitable for collecting < 1000 metrics / sec. For collecting > 1000 metrics / sec see the multi-worker sink here: https://github.com/DataDog/graphite-sink-multi-worker
This assumes the Datadog Agent, including the dogstatsd service is running on your host. The metric collector sends metrics to Datadog using dogstatsd.
For information on installing the client see here: https://docs.datadoghq.com/guides/basic_agent_usage/
clone https://github.com/DataDog/graphite-sink
raphite-sink
apt-get update
apt-get install supervisor
apt-get install python-pip
pip install datadog
pip install tornado
Navigate to the repo directory and edit graphite_sink.py, updating 'myapp.prefix' with the metric prefix you are sending to datadog.
python graphite_sink.py 17310
carbon_client.py is included to generate metrics with unique tags and send high throughput to the graphite_sink(s).
Edit /etc/supervisor/conf.d/supervisor.conf. Add the following, updating 'numprocs'.
gram:graphite_sink]
and=python /exact/path/to/graphite-sink/graphite_sink.py 1731%(process_num)01d
ess_name=%(program_name)s_%(process_num)01d
rect_stdout=true
=ubuntu
ut_logfile=/var/log/graphite_sink-%(process_num)01d.log
rocs=1
Update supervisor and restart all services.
supervisorctl
te
art all
Point your carbon relay at the graphite sink specified in step 2.
sink-hostname:17310
There are different options for distributing carbon relay, whether set with destinations directly in the carbon config or using haproxy.
If using relay rules it is advantageous to send only the metrics you wish to see in datadog to the sinks. For example:
adog]
ern = ^myapp\.prefix.+
inations = haproxy:port
ault]
ult = true
inations = 127.0.0.1:2004