is there a way to display certain visualizations only when a certain value is passing a threshold?
I want to monitor a bunch of sensors, lets say 100 in one dashboard.
Even if I use colors to express critical values in e.g. red, it’s still not easy to gain an
overview, when there are, for example, 100 gauges in one dashboard.
I would be easier if I could display only the gauges that display a critical value.
Or is there maybe a visualization that I’m not aware of for such a case?
Hmm, not exactly sure what you mean by a “filter”, but I have an idea.
But how would that help me?
I would still have the visualization in Grafana and if I filter out the data, the visualization will show “No data”, but will be still there.
Or did I misunderstood you?
should we assume you meant influxdb? please share table structure if using influxql
or flux query/ please identify from your data what constitutes a critical value
I’m not 100% sure if I understood your questions correctly. I will try to answer in the best possible way.
Äh, yes, sure, sorry, it’s influxdb
Here I’m not sure if I give the expected answer, but a line in my data would look something like this: room_temp,device_id=eui-70b3d57ed006478e,host=SmartCity,topic=v3/ow-esp32-otaa@ttn/devices/eui-70b3d57ed006478e/up temperature=21.8
What I want to do is to monitor how many datapoints I have received in an hour. Since I know that the sensor is supposed to send a new value each 5 min, I should have 12 entries in the database per hour.
For that I’m using this InfluxQL query: SELECT count("temperature") FROM "room_temp" WHERE ("device_id"::tag = 'eui-70b3d57ed006478e') GROUP BY time(60m)
It works (more or less, but that is another question, raised here: GROUP BY time - want to look backwards / handling timing deviations).
When I have received less than, let’s say 11 datapoints in an hour I would highlight that on the dashboard (= critical value).
SELECT count("temperature") ,
case
when count(1) < 12 then 1
else 0 end isMissing
FROM "room_temp"
WHERE ("device_id"::tag = 'eui-70b3d57ed006478e')
GROUP BY time(60m)
look at the case statement. can you do that in influxql. please dont say I am not sure
or maybe you can use a transformation based way of checking the count of rows and usr it for showing red color
otherwise your question is not a grafana question but an influxsb question
You might want to explore using dynamic filters or conditional formatting in your dashboard tool the forbidden leggings. Many platforms allow you to set conditions so that only elements meeting specific criteria (like critical values) are displayed. This way, you can focus on the gauges that need attention without getting overwhelmed by all 100 at once.
And if that would be true ? Just asking …
But that is not an issue, with your advice I can did deeper and see if it possible.
I think it is infectious to misspell influxdb , anyhow, I guess you’re right. It touches the slight confusion with query languages in influxdb, SQL not here now (in the OSS version), Flux only limited in the future version (V3) ind InfluxQL missing some capabilities.
Anyhow, we drifted a bit a way from my starting question. Whatever the way is to identify a critical value - is there a way to show a visualization only when a critical value is reached?
Maybe we haven’t completely understood each other .
Taking your screenshot above (though in my mind 11 should be orange and 12, as the expected best value should be green). I don’t want to show the green (“everything is OK”) gauge at all. Only the orange and red gauges. So that I can see directly which sensors have issues without scanning and scrolling through the majority that is green and don’t need any attention. Imagine there are 100 of this gauges in one dashboard.
Hm, I feel that doesn’t matter for the basic question, if I can hide complete visualizations?
But anyhow, lets say every count < 11 (10, 9, …, 1, 0) should be NOT OK.
Maybe I can come up later with a more sophisticated criteria, but for now that should be good enough.
Looks like exactly what I’m looking for!
But - I hope the question is not too stupid, seems to be obvious for you - how is that done?!
Looks like pure magic to me!