Nicolas Voyez
Nicolas Voyez

Reputation: 33

Grafana SingleStat : Percentage of time over treshold

I'm trying to create a monitoring board for some of my metrics.

I got two different path which are path.Ok.*, path.Ko.* and my goal is to have a box which is red when there is more that 1% of KOs more than 1% of time.

I got no problem to create a box telling me when there is currently more than 1% KO currently. The query looks like

asPercent(sumSeries(path.Ko.\*), sumSeries(path.\*.\*))

with a value stat "Current", and the good treshold.

My problem would be to get the time spent over the treshold, which I don't find.

Is there any way to achieve this ?

Upvotes: 1

Views: 314

Answers (1)

Nicolas Voyez
Nicolas Voyez

Reputation: 33

Found the answer, can still be useful for someone who is looking for this specific feature : do

scale(transformNull(pow(removeBelowValue(previousQuery, 1), 0), 0), 100)

Upvotes: 1

Related Questions