InfluxDB: Flux - Query remote InfluxDB: Unterschied zwischen den Versionen

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „With InfluxDB 2.x you can query remote InfluxDB sources with the Flux function ''from()''. <br> From() cannot retrieve data from remote InfluxDB OSS 1.x or Inf…“)
 
K
Zeile 1: Zeile 1:
With InfluxDB 2.x you can query remote InfluxDB sources with the Flux function ''from()''. <br>
+
'''InfluxDB 2.x can query remote InfluxDB sources''' with the Flux function ''from()''. <br>
 
From() cannot retrieve data from remote InfluxDB OSS 1.x or InfluxDB Enterprise 1.x data sources
 
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.
+
To query remote InfluxDB sources, include the '''host''', '''token''', and '''org''' (or orgID) parameters.
  
 
=== Example ===
 
=== Example ===

Version vom 15. März 2021, 14:04 Uhr

InfluxDB 2.x 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>")
  ..