0

I am logging a success count metric and failure count metric for every 30 seconds into graphite. In the Grafana, I am using per second and hitCount(1minute) that aggregates the count(success and failure) for every minute. Now I need to calculate the percentage of success for every minute? Any advice on how to proceed?

Also, I am using groupbyNode on the fourth metric * mentioned below.

Success metric : api.server.metric.*.success.count
Failure metric : api.server.metric.*.failure.count
Harish
  • 565
  • 1
  • 12
  • 34

1 Answers1

0

Try something like this:

asPercent(api.server.metric.*.success.count,sumSeries(api.server.metric.*success.count, api.server.metric.*.failure.count),0)

or if you just have failure and success as values :

asPercent(api.server.metric.*.success.count,api.server.metric.*.*.count,0)
Jean
  • 197
  • 10