The timestamp feature is only really designed for limited situations, such as 
ingesting metrics from another metric system. Scraping is generally expected to 
be returning the metric value from "now" (or in the case of coming via another 
metric system within the last few minutes). As Prometheus is primarily a metric 
system for metrics around operational systems you want alerts to appear in a 
timely manner if issues occur.

Ingesting really old data is often needed to backfill metrics, but this is done 
via a different method to scraping.

Are you able to give a bit more insight around the ingestion of really old 
data? 

On 12 April 2023 08:55:39 BST, Ahmed Kooli <kooliahme...@gmail.com> wrote:
>I am using theprometheus_client library on Python to monitor some metrics 
>and these were created in the past (months ago). When I fetch them with 
>Prometheus they are displayed at collection time and I would like to 
>specify a custom timestamp. I tried to create custom metrics and override 
>built-in functions to specify a timestamp but it seems to only work for a 
>short time shift (= custom timestamp - time at collection), does anyone 
>have an idea ? Thanks.
>
>-- 
>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-users+unsubscr...@googlegroups.com.
>To view this discussion on the web visit 
>https://groups.google.com/d/msgid/prometheus-users/92cceaaf-3dcf-4484-b490-97493e9f3203n%40googlegroups.com.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/73397A39-FC51-471A-A00E-B3FADAEA513A%40Jahingo.com.

Reply via email to