I’m new to Grafana (using 6.7.2 windows build) and I’m currently struggling to coloring the background in Singlestat panel. I have already searched the community and have tried a couple of things but unfortunatley with no success. So please bear with me if this question is actually already answered.
I think the problem is the time format of my query output.
As you can see the unit is set to duration (hh:mm:ss) what matches exactly my query output. But why is the thresholds are ignored? What I want to achiev is a dynamic background with coloring like this
if (value <= 01:00:00)
Green
else if (value > 01:00:00 AND value <= 02:00:00)
Yellow
else if (value >= 03:00:00)
Red
thanks for you quick answer. But no, this is indeed the query output. Here is the important part of the query what I’m using to calculate time averages out of a Maria DB datasource.
But maybe I don’t need the formatting in the query itself, probably I can just use a unix timestamp and the formatting will be done in the value unit. Probably with unix timestamp query output the threshold function can work better.
You are pretty correct. The threshold should be in seconds. It worked for me in any Grafana dashboard. Currently I am using hh.mm.ss unit but should be same for any time units