Hi Dhanush, The way Prometheus works (usually) is that it scrapes the current value of all metrics from a target / exporter. So a /metrics endpoint does not provide historical data, the history only gets built up by Prometheus itself as a process of scraping and storing current values periodically in the time series database. So if you only have been scraping for 2h, it's expected that you would only get 2h of data in your TSDB.
Regards, Julius On Fri, Jan 22, 2021 at 10:37 AM Dhanush Eswar <[email protected]> wrote: > Hi, > I am new to prometheus, I am using prometheus_client python package for > exporting metrics and I hosted the python program on some Amazon EC2 > instance, I have been receiving the data from the metrics for only 2 hours > and the Graph of the Grafana shows only that data(for 2 hours), Can anyone > tell why its happening in such a way and provide me some tips. > > Best, > Dhanush Eswar G > > -- > 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/8f19c390-ad71-4c21-85ea-f0159c52a2b7n%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/8f19c390-ad71-4c21-85ea-f0159c52a2b7n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Julius Volz PromLabs - promlabs.com -- 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/CAObpH5xaCpQfZNLKDiymf_ge_As0RZT%2BXacR5Rg5VML5Qa0paA%40mail.gmail.com.

