FluxQuery
yaml
type: "io.kestra.plugin.influxdb.fluxquery"
Examples
yaml
id: influxdb_flux_query
namespace: company.team
tasks:
- id: query_influxdb
type: io.kestra.plugin.influxdb.FluxQuery
connection:
url: "{{ secret('INFLUXDB_URL') }}"
token: "{{ secret('INFLUXDB_TOKEN') }}"
org: "my-org"
query: |
from(bucket: "my-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "cpu")
|> yield()
fetchType: STORE
yaml
id: influxdb_flux_query_inline
namespace: company.team
tasks:
- id: query_influxdb
type: io.kestra.plugin.influxdb.FluxQuery
connection:
url: "{{ secret('INFLUXDB_URL') }}"
token: "{{ secret('INFLUXDB_TOKEN') }}"
org: "my-org"
query: |
from(bucket: "my-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "cpu")
|> limit(n: 10)
|> yield()
fetchType: FETCH
yaml
id: influxdb_flux_query_one
namespace: company.team
tasks:
- id: query_influxdb
type: io.kestra.plugin.influxdb.FluxQuery
connection:
url: "{{ secret('INFLUXDB_URL') }}"
token: "{{ secret('INFLUXDB_TOKEN') }}"
org: "my-org"
query: |
from(bucket: "my-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "cpu")
|> limit(n: 1)
|> yield()
fetchType: FETCH_ONE
Properties
connection *RequiredNon-dynamicInfluxDBConnection
org *Requiredstring
query *Requiredstring
bucket string
fetchType string
Default
NONE
Possible Values
STORE
FETCH
FETCH_ONE
NONE
Outputs
row object
rows array
SubType object
size integer
total integer
uri string
Format
uri