Learn about the Graphite Integration.
Graphite Data Integration
The Wavefront proxy supports the plaintext Graphite data format and the pickle Graphite data format.
The plaintext Graphite data format is different than the Wavefront data format. Wavefront supports point tags natively with its data format, and requires a tag named source
or host
. The setup process explains how to extract a source from the Graphite metric name.
Graphite Data Integration Setup
You can send Graphite data to Wavefront only or duplicate Graphite data, sending it to both Wavefront and Graphite.
Send Graphite Data to Wavefront
- If you have not already done so, install a Wavefront proxy.
- Configure the Wavefront proxy to accept Graphite formatted data:
-
On the server running your Wavefront proxy, open the file
/etc/wavefront/wavefront-proxy/wavefront.conf
. Uncomment and configure the following properties as required:Property Purpose Format Example Since Version graphitePorts TCP ports to listen on for Graphite data. Define which of the segments in your Graphite metrics map to a hostname in the graphiteFormat property. Default: 2003. A comma-separated list of available port numbers. Can be a single port. 2003
2003,2004graphiteFormat Indexes of fields within your Graphite/collectd metric names that correspond to a hostname. For example, if your metrics have the format: collectd.prod.www04.cpu.loadavg.1m
specify the 3rd and 2nd indexeswww04.prod
to be extracted and treated as the hostname. The remaindercollectd.cpu.loadavg.1m
is treated as the metric name.A comma-separated list of indexes. 3,2
4,2,5
3graphiteDelimiters Characters that should be replaced by dots, in case they were escaped within Graphite/collectd before sending. A common delimiter is the underscore character; so if you extract a hostname field with the value web04_www
, it is changed toweb04.www
.A concatenation of delimiter characters, without any separators. - picklePorts TCP ports to listen on for incoming data in Graphite pickle format (from carbon-relay). This is expecting streaming data formatted as: [Length of pickled data to follow in a 4 byte unsigned int][pickled data of the given length]. Default: None. A comma-separated list of available port numbers. Can be a single port. picklePorts=5878 3.20 -
Save and close
wavefront.conf
.
-
- Restart the proxy:
sudo service wavefront-proxy restart
. - Tail the proxy log file to make sure there are no errors:
tail -f /var/log/wavefront/wavefront.log
. - Point your collector agents at the Wavefront proxy, using the ports you specified for Graphite formatted data.
Duplicate Graphite Data to Wavefront and Graphite Using carbon-relay
- Edit the
carbon.conf
file for your Graphite installation.- Find the
LINE_RECEIVER_PORT
andPICKLE_RECEIVER_PORT
properties in thecarbon
section. Note these values as line and receiver ports. - Go to the
relay
section and find theLINE_RECEIVER_PORT
andPICKLE_RECEIVER_PORT
properties. Set these to the values noted from thecarbon
section. - Find the
RELAY_METHOD
property. To duplicate all points, set toconsistent-hashing
. To duplicate only some points, set torules
, and modify therules-relay.conf
file accordingly. - If the
RELAY_METHOD
is set toconsistent-hashing
, find theREPLICATION_FACTOR
property and set to2
, and find theDIVERSE_REPLICAS
property and set toTrue
. - Find the
DESTINATIONS
property and set to127.0.0.1:2014, <wavefront_proxy_server>:5878
. In this case port 2014 on the graphite machine should be available. Replace<wavefront_proxy_server>
accordingly. - Go back to the
carbon
section of the file, and set theLINE_RECEIVER_PORT
andPICKER_RECEIVER_PORT
properties to 2013 and 2014 accordingly (based on the port setting in the preceding step). - Save the
carbon.conf
file.
- Find the
- If you have not already done so, install the Wavefront proxy.
- Edit the
/etc/wavefront/wavefront-proxy/conf/wavefront.conf
file. - Find the
graphitePorts
property. Uncomment and set to a free port on the system. 2113 is a good choice. The default is 2013, but if Graphite and the Wavefront proxy are running on the same machine you will need to set this to another port. - Find the
graphiteFormat
property and set according to the existing metric hierarchy within Graphite to extract the hostname. If the metrics look like:collectd.prod.www04.cpu.loadavg.1m
, then the 3rd and 2nd indices should be extracted and treated as the hostname (www04.prod
) and the remainder should be treated as the final metric name (collectd.cpu.loadavg.1m
). In this case the property value will be3,2
. This will likely be different for each implementation. - Find the
graphiteDelimiters
property and set this to an underscore (_
). - Find the
picklePorts
property and set this to5878
. - Save the
wavefront.conf
file.
- Edit the
- Restart the Wavefront proxy service:
sudo service wavefront-proxy restart
. - Stop carbon-agent, and any previous (if running) carbon-relay.
- Start carbon-relay then carbon-agent. Metrics should now be duplicated in Wavefront.