grafana correct way to calculate percent of request(per hour)

18 Views Asked by At

i know how to calculate number of successfull requests via #A:my.server.$Environment.api.*.httpServerRequests.exception.*.method.*.outcome.*.status.200.uri.{submit}.count #B:my.server.$Environment.api.*.httpServerRequests.exception.*.method.*.outcome.*.status.200.uri.{confirm}.count

I'm trying to count percent of confirm to submit per hour.

Will this query be correct for such purpose:

asPecent(summarize(sumSeries(#B), '1h', 'sum', false),summarize(sumSeries(#A), '1h', 'sum', false))

or am I doing something wrong?

1

There are 1 best solutions below

0
Sheyko Dmitriy On BEST ANSWER

summarize is not good option for such thing. I ended up using movingSum, which provides more relevant data