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).
>> Hm, I did not think about timestamps being slightly different.
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?
>> According to the official docs and quite a few blogs, remote_write increases the resource utilization of source Prometheus by ~ 25%. That is the only reason I'm trying to avoid that.
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" but it is only for historical data; it doesn't work for the head block.
>> Maybe, I used the word sync incorrectly. I actually want to query some data available in Prometheus 1 in my 2nd Prometheus and use them for some autoscaling use-case.