DataDog/graphite-sink

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Threaded graphite sink for converting and forwarding graphite / carbon metrics to Datadog.

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

Step 0 - Datadog Agent

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/

Step 1 - Graphite sink(s)
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.

To run from the cli for testing purposes:

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).

To install as a service:

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
Step 2 - Your carbon-relay

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

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.