Federation might match your use case, since you can filter metrics by 
regex. But effectively you are rescraping the data, so the timestamps won't 
be the same. (Although sometimes this is an advantage, e.g. if you actually 
want lower resolution data in your copy).

Otherwise, look at remote write, using write_relabel_configs to filter the 
data, which will copy the data exactly, and buffer it if the remote system 
is temporarily down. I don't understand why you discarded that option - 
what makes you think resource utilization is poor for prom A remote-writing 
to prom B?

Remote read is not an option for syncing data as far as I know - only for 
performing queries from a remote data source.  There is "backfill 
<https://prometheus.io/docs/prometheus/latest/storage/#backfilling-from-openmetrics-format>"
 
but it is only for historical data; it doesn't work for the head block.

On Saturday, 2 September 2023 at 20:40:55 UTC+1 [email protected] wrote:

> I have a use-case wherein I need to send some filtered data (metrics that 
> match a regex) from one Prometheus to another.
> What is the suggested approach for such cases? I was thinking of using 
> remote_read (over remote_write because remote_read is better in terms of 
> resource utilization), but I couldn't find anything in the docs to suggest 
> that I can filter what data to read while using remote_read.
> Prometheus Version - v2.34.0

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/e3f9ddfa-251d-43b5-a3ca-dbdb6e4c40d1n%40googlegroups.com.

Reply via email to