I wrote a simple FLUX script that joins data from two separate buckets on one InfluxDB instance and then performs math.
leftdata = from(bucket: "contra/autogen")
|> range(start: -86d, stop: -85d)
|> filter(fn: (r) => r._measurement == "playerone" and (r._field == "score"))
rightdata = from(bucket: "gradius/default_policy")
|> range(start: -86d, stop: -85d)
|> filter(fn: (r) => r._measurement == "playerone" and (r._field == "score"))
join( tables: { lef: leftdata, rig: rightdata }, on: ["_time","_field","_measurement"])
|> map(fn: (r) => ({_time:r._time, _value: r._value_lef / (r._value_lef + r._value_rig) } )
This works very well!
Taking this one step further, could I pull streams from two separate InfluxDB instances?
Have one bucket from 192.168.10.213 and one from 172.16.10.10, for example?