Arithmetic on several datasets

If I use the shortcut series.tag for
SELECT mean(“value”) FROM “series” WHERE tag=“tag” AND timeFilter GROUP BY time(__interval) fill(null)

I’d like to graph
temp.offset / (vitoocon.outdoor-temp.setpoint)

Probably with some special handling when the divisor gets near zero.

How would I handle this?

If I understand correctly:

  • InfluxDB is your datasource
  • you want cross measurement math

=> then you will need to use (new) Flux instead of InfluxQL.
Example: https://www.influxdata.com/blog/practical-uses-of-cross-measurement-math-in-flux/

I’m not sure how I’m supposed to do that in grafana.

Good start is the documentation and Flux plugin https://grafana.com/grafana/plugins/grafana-influxdb-flux-datasource

Thanks.

Alas I’m on InfluxDB v1.6.4 (git: unknown unknown), installed as Debian package, so I’m not sure how to update. I’ll think about that tomorrow :wink:

While apt just did “Unpacking grafana (6.5.1) over (6.5.0) …”, the influxdb package is still 1.6.4-1+b22