Skip to content

why does 1 scrape provide 20 samples? #1095

Answered by SuperQ
vcarceler asked this question in Q&A
Discussion options

You must be logged in to vote

That is expected behavior.

It is related to the way Prometheus lookback/staleness handling works. Prometheus timestamps are accurate to the millisecond. So it looks back in time from the point in the graph, up to 5 minutes, in order to present the data at time X,Y,Z.

Because your scrape interval is much slower, you're always going to run into this staleness issue.

Grafana has a default "step", configured in the datasource. This is the "Step" in the per-query Options in your dashboard. If you set the "Min Step" to 30m, it will better align your data points.

Here's a good video on Prometheus data handling.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vcarceler
Comment options

Answer selected by vcarceler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants