docs/querying/remote_read_api.md
NOTE: This is not currently considered part of the stable API and is subject to change even between non-major version releases of Prometheus.
This API provides data read functionality from Prometheus. This interface expects snappy compression. The API definition is located here. Protobuf definitions are also available on buf.build.
Request are made to the following endpoint.
/api/v1/read
The external_labels setting in global affects remote read on both sides:
external_labels to every time series returned via /api/v1/read. The labels are not stored in TSDB; they are added at response time. Incoming equality matchers that match an external label are rewritten to match the empty string so that TSDB can satisfy the query.external_labels as additional equality matchers in the request, then strips them from the response.If the querying Prometheus has external_labels that differ from or are absent on the remote server, queries may return no results because the matchers will not match. Ensure that any external_labels on the querying side are consistent with the labels present on the remote side.
This returns a message that includes a list of raw samples matching the requested query.
These streamed chunks utilize an XOR algorithm inspired by the Gorilla compression to encode the chunks. However, it provides resolution to the millisecond instead of to the second.