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

  1. If you have not already done so, install a Wavefront proxy.
  2. Configure the Wavefront proxy to accept Graphite formatted data:
    1. 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
      graphiteFormat 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 indexes www04.prod to be extracted and treated as the hostname. The remainder collectd.cpu.loadavg.1m is treated as the metric name. A comma-separated list of indexes. 3,2
      graphiteDelimiters 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 to web04.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
    2. Save and close wavefront.conf.

  3. Restart the proxy: sudo service wavefront-proxy restart.
  4. Tail the proxy log file to make sure there are no errors: tail -f /var/log/wavefront/wavefront.log.
  5. 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

  1. Edit the carbon.conf file for your Graphite installation.
    1. Find the LINE_RECEIVER_PORT and PICKLE_RECEIVER_PORT properties in the carbon section. Note these values as line and receiver ports.
    2. Go to the relay section and find the LINE_RECEIVER_PORT and PICKLE_RECEIVER_PORT properties. Set these to the values noted from the carbon section.
    3. Find the RELAY_METHOD property. To duplicate all points, set to consistent-hashing. To duplicate only some points, set to rules, and modify the rules-relay.conf file accordingly.
    4. If the RELAY_METHOD is set to consistent-hashing, find the REPLICATION_FACTOR property and set to 2, and find the DIVERSE_REPLICAS property and set to True.
    5. Find the DESTINATIONS property and set to, <wavefront_proxy_server>:5878. In this case port 2014 on the graphite machine should be available. Replace <wavefront_proxy_server> accordingly.
    6. Go back to the carbon section of the file, and set the LINE_RECEIVER_PORT and PICKER_RECEIVER_PORT properties to 2013 and 2014 accordingly (based on the port setting in the preceding step).
    7. Save the carbon.conf file.
  2. If you have not already done so, install the Wavefront proxy.
    1. Edit the /etc/wavefront/wavefront-proxy/conf/wavefront.conf file.
    2. 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.
    3. 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 be 3,2. This will likely be different for each implementation.
    4. Find the graphiteDelimiters property and set this to an underscore (_).
    5. Find the picklePorts property and set this to 5878.
    6. Save the wavefront.conf file.
  3. Restart the Wavefront proxy service: sudo service wavefront-proxy restart.
  4. Stop carbon-agent, and any previous (if running) carbon-relay.
  5. Start carbon-relay then carbon-agent. Metrics should now be duplicated in Wavefront.