This is archived documentation for v2.2.x. Go to the latest version.

Graphite proxyGraphite write proxy

Graphite write proxy

The Graphite write proxy accepts the ingest requests sent by Carbon-relay-ng and then translates the incoming Graphite metrics into Prometheus metrics. Once the metrics have been translated into Prometheus they get forwarded to the GEM distributor, which handles them the same way as it would handle any other Prometheus remote_write requests. The Graphite to Prometheus metric translation differentiates between untagged Graphite metrics and tagged Graphite metrics, the name mapping scheme for the two looks as following:

Untagged Graphite metrics

Graphite metric: some.test.metric

In Prometheus: graphite_untagged{__n000__="some", __n001__="test", __n002__="metric"}

Tagged Graphite metrics

Graphite metric: some.test.metric;my_tag=my_value;another_tag=another_value

In Prometheus: graphite_tagged{name="some.test.metric", my_tag="my_value", another_tag="another_value"}

Writing metrics with the remote write API

For an enhanced internal write performance we’re introducing a new feature that will become the default write strategy in future releases. This is a recommended internal tweak for the graphite write proxy to use Grafana Mimir remote write API. To enable it, pass the following configuration:


-graphite.write-proxy.remote-write-enabled: 'true',
-graphite.write-proxy.write-endpoint: 'http://<distributor-address>:<distributor-port>/api/v1/push',
-graphite.write-proxy.skip-label-validation: 'true',

Regarding graphite.write-proxy.write-endpoint we should make some clarifications:

  • The address should point to the Grafana Mimir distributors.
  • If the there is a gateway in front of the distributors with a http prefix, then you need to add it at the end of the query address to make it consistent. Otherwise graphite won’t be able to write against the right endpoint.
  • If you are running the single binary installation then this address will be http://localhost:<local-installation-port>/api/v1/push.