FluxQuery
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-dynamic
Definitions
io.kestra.plugin.influxdb.InfluxDBConnection
token*Requiredstring
url*Requiredstring
connectTimeoutstring
Default
PT10SreadTimeoutstring
Default
PT10Sorg *Requiredstring
query *Requiredstring
bucket string
fetchType string
Default
NONEPossible Values
STOREFETCHFETCH_ONENONEOutputs
row object
rows array
SubTypeobject
size integer
total integer
uri string
Format
uriMetrics
records counter
Unit
count