I installed InfluxDB, Grafana and the InfluxDB component the other day and everything seemed to work just fine until this morning when one of my 433 MHz thermometers had a small hicup and sent a value in the -70 °C range. Obviously it was transferred to the database and is now wrecking my graphs. Is there a simple way of to filter out unreasonable values and stop them from going into the database? (if not, is there a simple way to delete them from the database?)
-70 centigrade might be reasonable in Siberia but not where I live in southern Sweden…
Indeed, influx can delete only based on time and it’s a huge PITA to delete bad data. First you have to query the database for the bad data, then you have to use a separate query for each bad input you have.
> select * from "°C" where value < 20
name: °C
time Last Update_str Sensor Id_str Station Id Station Name_str Zone Id_str attribution_str battery_level domain entity_id friendly_name_str node_id power_consumption value wake_up_interval
---- --------------- ------------- ---------- ---------------- ----------- --------------- ------------- ------ --------- ----------------- ------- ----------------- ----- ----------------
1490253251434696960 sensor office_temp Office Temp -142.9
I can’t believe you can’t just delete in the same manner you select. Time series data doesn’t brake if you have missing entries.
Yeah, it’s a PITA. I’m thinking about going for @kirichkov’s solution in post 2 instead and filter those values out when generating graphs . I can then delete bad values at my own will while still keeping the graph Y axis from freaking out.
I simply click the “+” icon and the drop down that shows “entity_id”, I type “value” followed by “TAB”. That adds the new condition and I can switch between “AND” / “OR” and the conditional can be changed between = , > , < , >= , <=
Yeah, that’s what I do too. The graph updates when I have completed the query but when I click Save dashboard nothing seems to happen, if I reload the page my changes are gone.