Reputation: 917
I have a counter metric the counts the number of errors thrown by my application. I'm trying to use a single stat panel to show the number of errors thrown in the selected time period, but failing miserably.
I've tried sumSeries (nonNegativeDerivative(myapp.count)) but this didn't work .
Any tips would be gratefully appreciated.
Nick
Upvotes: 1
Views: 1517
Reputation: 7195
You can try the following:
integral(transformNull(myapp.count, 0))
Since it is a count, the integral will be just the sum of all counts over the selected period. The transformNull
serves to sum 0 for times where no counts were collected.
Then in the grafana singlestat panel, select max
as function value, so you will get the last value of the integral.
Upvotes: 4