While your mechanism to send data between servers wouldn't be recommended (either straight federation or something like Thanos would be preferable) it sounds like the issue you are seeing is due to your long scrape interval. Due to staleness the maximum interval is around 2 minutes, so in your case for the majority of the time Prometheus is recording the time series as stale and therefore not returning anything if queried.
This is by design, so the main answer would be to reduce the
scraping interval for your custom exporter.
-- Stuart Clark
--
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 prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/8eebdfd4-ab02-4632-bb9a-a60f824fe4fb%40googlegroups.com.
Thanks for the response Stuark. The reason behind keeping the scraping interval so long is, on receiving scrape request from Prometheus, my exporter performs around 10 queries against database and exposes the result as 10 metrics, which will take around 15 minutes to complete all the queries. And Prometheus scrape was timing out. So, to increase the scrape_timeout I had to increase the scrape_interval also.
To unsubscribe from this group and stop receiving emails from it, send an email to promethe...@googlegroups.com.