0

I am graphing the code:500's. I have one series with this

response_total{job="linkerd-proxy", status_code="500"}

The line I get is very simple. Starts at 5 and increases to 6 then continues on at 6. Ok so far.

But then I change the query to this

increase(response_total{job="linkerd-proxy", status_code="500"}[60s])

I expected a line that starts are 0 bumps up to 1 for a short bit at the time of the event, then goes back to 0. But instead it bumps up to 2. And if I change 60s to 120s it only bumps up to 1.33333. Why does it do that?

My understanding of "increase" is that it takes the datapoint at the time and subtracts the datapoint at Xs before the time. So the length of that time shouldn't matter, and of course the value can only be 5 or 6, so where are these numbers coming from?

Ken White
  • 123,280
  • 14
  • 225
  • 444
Jack-of-some
  • 309
  • 3
  • 12

1 Answers1

1

Some more searching found questions on here that didn't sounds the same at first, but can explain what I am seeing. Here is a pretty good one.

Why does increase() return a value of 1.33 in prometheus?

In general, Prometheus is extrapolating values if the real datapoints are too far from the ends of the range. Those values end up messing with the math.

Jack-of-some
  • 309
  • 3
  • 12