Threshold for each series in a single panel

Hello Everyone,

I am using Grafana 10.0.0.
I have four data series, and each of them should stay within a specified range. If even one of these go out of the range, I want the stat panel to say Needs attention.

I have acheived this with series that have boolean values and all of them need to be true. I converted them into numericals using the convert transform and used the reduce function “min” from the ‘add fields from calculation’ transfrom. If the min value of even one of the series go to zero, the min will be zero and this is mapped to a “needs attention” value. I have made use of the replace all series with the “min” series to make this work and the stat panel shows only one value that is collective of all the series.

The problem with this panel is however is that, they are not booleans zeroes or ones, but continuous values. I used the filter data by values transform to show the series only they are within the threshold range. If there is no values, then its a NaN. I mapped this Nan to a “Needs attention” value. And this works. But, I can’t make a collective for all the series into one value such as the “min” collective for the boolean value series.

I am wondering if there is any OR or AND function that I can use. Let’s say the collective series is called summary.

AND case:
If series 1 is within threshold and series 2 is within threshold and series 3 is within threshold, then, summary = ‘normal range’

OR case:
If series 1 is NaN or series 2 is NaN or series 3 is NaN, then, summary = ‘needs attention’

Each series have their own threshold range, series one should be within 195 and 200, while series 2 should be within 80 to 100 and series 3 should be within 85 to 95.

Solved

how was it solved? so that others can benefit from it

I posted it again with picture to explain the problem better and the solution is also posted there.

1 Like