In the process of capturing data, the server needs to calculate for five minutes before returning the result, so I need to collect it every 5 minutes。
Brian Candler <[email protected]> 于2020年10月16日周五 下午2:38写道: > On Friday, 16 October 2020 03:32:29 UTC+1, li yun wrote: >> >> Because my data is collected every 5 minutes, I use sum_over_time. If I >> don’t use it, it may not be possible to draw the graph at some points. >> >> > That doesn't make sense to me. Prometheus will look back up to 5 minutes > to find a data point anyway. > > You're correct that if you sample at 5 minute intervals, and you do > sum_over_time[5m], then *normally* the sum_over_time will sum exactly one > data point. If the samples aren't *exactly* 5 minutes apart then sometimes > it will return zero, and sometimes it will sum two data points, both of > which are silly. > > Prometheus recommends a *minimum* polling time of 2 minutes, so that if > one scrape is missed, the timeseries does not go scale (i.e. the last point > can be found). > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Prometheus Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/prometheus-users/yS43RBTGls4/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/dd1f7c8c-0086-4506-be2b-8023b281bc9fo%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/dd1f7c8c-0086-4506-be2b-8023b281bc9fo%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAO63JBYwYLG9tV4qLD3FGgG6Gmq7jXJWyukybhgspAfNw3s18w%40mail.gmail.com.

