0

I'm having this problem with grafana to query the number of requests incoming to my service. Using Prometheus-net on my dotnet core Service, I have the "http_requests_received_total" which is a counter metric.

I run a 100 requests to Postman, ideally what I'd like to see is that at 12:20, a 100 requests came in (which is visible from seeing the counter go from 0 requests to 100 requests). However, when using rate() or increase(), or sum(rate/increase), I keep getting approximate results and it's never an exact 100 requests.

Can anyone point me into a direction on how I can achieve this or read up upon it?

Thanks!

1 Answers1

1

Prometheus may return fractional results from increase function because of extrapolation. See this issue for details. If you need exact integer results from increase() function, then try VictoriaMetrics - this is a Prometheus-like monitoring solution I work on. It returns the expected integer results from the increase() function.

valyala
  • 11,669
  • 1
  • 59
  • 62
  • 1
    Thanks a lot! I was hoping for a different answer, but I just succumbed to accepting this one and graphed 2 panels, 1 for the increase and 1 for the normal counter going up. and from the second one, we should be able to infer the exact number – Hesham Amer Feb 01 '23 at 13:56