Hi I am using Grafana Cloud and InfluxDB cloud. I have some sensor data, an upon errors these sensors send a value of 99.99. I managed to map these values to show error using value mappings, as in this image:
Now this works okay, but the usual values in my panel are between 0 and 20, so having these outliers at 99.99 makes the non-error data difficult to view. One idea I got is to replace the values = 99.99 with a negative number like -0.1, so the graph looks much better.
However the only way in which I managed to achieve this is through the query itself. Using flux (the influxDB query language) I used the map function:
|> map(fn: (r) => ({ r with _value: if r._value > 99 then float(v: "-0.1") else r._value }))
This works fine for small datasets, but if I try to view the last 30 days performance is not great, loading a visualization takes a lot of time.
I am wondering if there’s a grafana transformation I could use to achieve the same thing? I tried testing transformations and googled but was unsuccessful. Also perhaps someone has better advice as to how to show errors without distorting the whole graph.
Thanks,
Pablo