Architecture overview
This page provides an overview of the architecture of the Graphite proxy services and how they interact with the other GEM services.
API
The Graphite proxy in GEM exposes the same write and read endpoints as Grafana Cloud Graphite.
All endpoints have a /graphite/
prefix.
If using
access policies, write endpoints require the metrics:write
scope and read endpoints require the metrics:read
scope.
Metrics ingestion
This section explains the components of a typical ingestion pipeline. The use of Carbon-relay-ng is optional, if the metrics producer has the ability to send its metrics in the right format via HTTP(S) directly to the Graphite write proxy then Carbon-relay-ng could be omitted, but since Carbon-relay-ng comes with lots of useful features such as buffering of failed writes it is recommended to use it.
Carbon-relay-ng
Carbon-relay-ng is a relay for carbon streams, to make it forward data to the Graphite proxy a gnet
route needs to be
configured and pointed at the Graphite ingest API (<GEM gateway URL>/graphite/metrics
) on the Graphite write proxy.
It comes with a wide variety of features, for a detailed documentation of them refer to
Carbon-relay-ng.
The official documentation also comes with an example configuration which demonstrates the usage a gnet
route, refer to
grafanaNet route.
Graphite write proxy
The Graphite write proxy accepts the incoming requests which Carbon-relay-ng is sending and translates the Graphite metrics into Prometheus metrics, then it forwards them to the GEM distributors. For more information about how the process works, refer to Graphite write proxy.
Metrics querying
This section explains the components that are used to query Graphite metrics.
Graphite Querier
The Graphite querier provides the Graphite render API, for more information about the API refer to the Graphite documentation. It fetches the data required to serve a query from GEM, performs the configured aggregations on the data at query time and runs the requested Graphite functions on the aggregated data. For more information about how the process works, refer to Graphite querier.
Grafana datasource
If you are using the Graphite datasource to query the Graphite proxy, use the URL <GEM gateway URL>/graphite
.