I’m working with a dataset in InfluxDB 1.8 which has a significant amount of temperature data feeding in to it from IoT devices.
The aim is to create a table on a dashboard that only shows device which are reporting a temperature of below a particular value
My generic “return all the rows” query is an attempt at an equivalent of this pseudo-SQL:
SELECT last(value), device_name FROM temperature WHERE time > now() - 6h GROUP BY device_name
which should return
I then want to take that data and only show the data in the table when the value is less than 10, so something like:
SELECT last(value), device_name FROM temperature WHERE time > now() - 6h AND value < 10 GROUP BY device_name
So I can reformat the table as follows:
I’ve been battling the query syntax and formatting for a while, but I can’t work out how it should all hang together.