InfluxDB: Flux - Query remote InfluxDB
Aus Wiki-WebPerfect
Version vom 15. März 2021, 14:04 Uhr von Admin (Diskussion | Beiträge)
With InfluxDB 2.x you can query remote InfluxDB sources with the Flux function from().
From() cannot retrieve data from remote InfluxDB OSS 1.x or InfluxDB Enterprise 1.x data sources
To query remote InfluxDB sources, include the host, token, and org (or orgID) parameters.
Example
token = "<YOUR_TOKEN>" from( bucket: "<YOUR_BUCKET>", host: "https://<YOUR_INFLUXDB-INSTANCE>:8086", org: "<YOUR_ORGANISATION>", token: token ) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "<YOUR_MEASUREMENT>") ..