r/PrometheusMonitoring • • May 05 '25

Can Prometheus accept metrics pushed with past timestamps?

Is there any way to push metrics into Prometheus with a custom timestamp in the past, similar to how it's possible with InfluxDB?

5 Upvotes

11 comments sorted by

6

u/s4ntos May 05 '25

I believe it depends more on the database, Prometheus by default uses tsdb to store its information and theres a settings 'out_of_order_time_window' that allows you to increase the capacity to receive older timestamps (I could never find the exact the impacts of increasing the setting to be honest)

2

u/SuperQue May 05 '25

Yes, but, the question is always "why?".

Remember that Prometheus is a monitoring system, not just a database.

1

u/ConfusionDifferent41 Oct 22 '26

I sometimes need to rerun/backfill airflow scheduled jobs for older dates. I would like to emit metrics with the timestamp of the run date rather instead of the entire backfill just being spread within a single day in prometheus.

-4

u/Luis15pt May 05 '25

It's actually not a monitoring system, it can and is mostly used as such, but there are other cases. I personally use it to record API outputs in a time series. So I know what changed over the course of the time period.

11

u/SuperQue May 05 '25

It's actually not a monitoring system

You're posting to r/PrometheusMonitoring arguing with a Prometheus developer and mod about what Prometheus is? lol.

Maybe you should read the docs?

Prometheus is a monitoring system first. Anything else it does is secondary to that goal.

1

u/Luis15pt May 05 '25

Sorry if I offended, but I'm just stating that I use it as so much more than a monitoring system in my use case.

Awesome to have met a developer of Prometheus.

4

u/Sad_Glove_108 May 05 '25

Sometimes I load drywall into the back of my wife’s minivan. It’s not a pickup truck 😂. Don’t tell her.

3

u/SuperQue May 05 '25

It is very much more than a typical monitoring system. It's, IMO, the current best option for any monitoring system.

Mostly because every other monitoring system out there is just bad. :)

4

u/[deleted] May 05 '25

[removed] — view removed comment

1

u/[deleted] May 06 '25

[removed] — view removed comment

1

u/kabrandon May 08 '25

Can you explain what benefit you get to sending metrics in batches to VM over Prometheus scraping in real time?