I tried to obtains these measurements from prometheus:
increase(http_server_requests_seconds_count{uri="myURI"}[10s])
increase(http_server_requests_seconds_count{uri="myURI"}[30s])
rate(http_server_requests_seconds_count{uri="myURI"}[10s])
rate(http_server_requests_seconds_count{uri="myURI"}[30s])
Then I run a python script where 5 threads are created, each of them hitting this myURI endpoint:
What I see on Grafana is:
I received these values:
- 0
- 6
- 0
- 0.2
I expected to receive these (but didn't):
- 5 (as in the last 10 seconds this endpoint received 5 calls)
- 5 (as in the last 30 seconds this endpoint received 5 calls)
- 0.5 (the endpoint received 5 calls in 10 seconds 5/10)
- 0.167 (the endpoint received 5 calls in 30 seconds 5/30)
Can someone explain with my example the formula behind this function and a way to achieve the metrics/value I expect?