some problem for increase

8 views
Skip to first unread message

brokensword he

unread,
Aug 30, 2020, 10:52:07 PM8/30/20
to Prometheus Users
dear all
if time series is 0m 2m 4m 6m 8m 10m 12m and correspondingvalue is 1 1 1 2 2 2, When is use a range queries, increase(metrics_name[1m]), start = 0m, end = 12m, step=15s. with my knowledge I will get all zero,  But In actual I get value like this  0 0 0 0 0 ... 1 1 1 1 ... 0 0 0 0 .
wish someone can give me a brief explaination.

Ben Kochie

unread,
Aug 31, 2020, 3:37:17 AM8/31/20
to brokensword he, Prometheus Users
Something doesn't add up here, you're asking for a range of [1m], but you only have data points every 2 minutes. This is impossible, because you will never have two data points within the range, if you really have data only every 2 minutes, you would get a "no data" result from your query.

But, what you're probably seeing is that you have a faster scrape interval, and you have selected a step of 15 seconds. Prometheus time accuracy is down to the millisecond. So your actual timestamps are probably something like 0:05.525, 0:35.525, 1:05.525, 1:35.525, 2:05.525 2:35.525, etc.

When you're asking for a step of 15 seconds, the time range of [1m] is going to be overlapping the same data points multiple times. Each evaluation step is unaware of the other evaluation steps.

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/b37aae76-f4df-4e13-9e75-a05a8900072an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages