Maybe you are looking for count_over_time
https://promlabs.com/promql-cheat-sheet/ Jérôme Loyet <[email protected]> schrieb am Do., 18. Jan. 2024, 18:56: > Hello, > > I have a counter and I want to counter the number of occurences on a > duration (let's say 15m). I'm using delta() or increase but I'm not getting > the result I'm expecting. > > value @t0: 30242494 > value @t0+15m: 30609457 > calculated diff: 366963 > round(max_over_time(metric[15m])) - round(min_over_time(metric[15m])): > 366963 > round(delta(metric[15m])): 373183 > round(increase(metric[15m])): 373183 > > increase and delta both return the same value but it appears to be wrong > (+6220) while max_over_time - min_over_time return the expected value. > > I do not understand this behaviour. I must have miss something. > > Any help is appreciated, thx a lot. > > ++ Jerome > > -- > 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/e9864120-b1c2-4af9-91ee-9c9cbe0fb24an%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/e9864120-b1c2-4af9-91ee-9c9cbe0fb24an%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/CAJuaemaHoToizzuGqneVV8-QJ9p0ogwP2aUbf%2BbkgwOt%2Bd%3DqNw%40mail.gmail.com.

