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
.
Related Enterprise Metrics resources
Running Prometheus-as-a-service with Grafana Enterprise Metrics
Introducing Grafana Enterprise Metrics (GEM), a simple and scalable Prometheus service that is seamless to use, simple to maintain, and supported by Grafana Labs.
How Robinhood scaled from 100M to 700M time series with Grafana Enterprise Metrics
In this GrafanaCONline session, the Robinhood team tells how GME (GameStop) led to GEM (Grafana Enterprise Metrics).
Benchmarking Grafana Enterprise Metrics for horizontally scaling Prometheus up to 500 million active series
We stress-tested GEM to show how it horizontally scaled. One takeaway: Hardware usage scales linearly up to 500 million active series.