InfluxDB FluxTrigger

InfluxDB FluxTrigger

Certified

Trigger flow when Flux query returns rows

Polls a Flux query at a fixed interval (default 60 seconds) and starts a flow when at least one row is returned; fetchType mirrors FluxQuery output handling.

yaml
type: io.kestra.plugin.influxdb.FluxTrigger

Wait for an InfluxDB Flux query to return results, and then iterate through rows.

yaml
id: influxdb_trigger
namespace: company.team
tasks:
  - id: each
    type: io.kestra.plugin.core.flow.ForEach
    values: "{{ trigger.rows }}"
    tasks:
      - id: return
        type: io.kestra.plugin.core.debug.Return
        format: "{{ fromJson(taskrun.value) }}"
triggers:
  - id: watch
    type: io.kestra.plugin.influxdb.FluxTrigger
    interval: "PT5M"
    connection:
        url: "{{ secret('INFLUXDB_URL') }}"
        token: "{{ secret('INFLUXDB_TOKEN') }}"
    org: "{{ secret('INFLUXDB_ORG') }}"
    query: |
      from(bucket: "mybucket")
        |> range(start: -1h)
        |> filter(fn: (r) => r._measurement == "cpu")
        |> filter(fn: (r) => r._field == "usage_system")
        |> filter(fn: (r) => r._value > 80.0)
Properties
Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

Bucket to query

Connection to the InfluxDB instance

Definitions
token*Requiredstring

InfluxDB token

The authentication token for InfluxDB

url*Requiredstring

InfluxDB server URL

The URL of the InfluxDB server

connectTimeoutstring
DefaultPT10S

Connection timeout.

Connection establishment timeout (ISO-8601 duration, e.g. PT10S). Default is 10 seconds.

readTimeoutstring
DefaultPT10S

Read timeout.

Maximum time to wait for response bytes (including initial response) (ISO-8601 duration, e.g. PT10S). Default is 10 seconds.

DefaultNONE
Possible Values
STOREFETCHFETCH_ONENONE

How to fetch the query result

DefaultPT1M
Formatduration

Interval between polling.

The interval between 2 different polls of schedule, this can avoid to overload the remote system with too many calls. For most of the triggers that depend on external systems, a minimal interval must be at least PT30S. See ISO_8601 Durations for more information of available interval values.

Organization to query

Flux query to execute on each poll

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Defaulttrue

A condition that determines whether the trigger should run.

A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.

First fetched row

Only populated when fetchType=FETCH_ONE

SubTypeobject

Fetched rows

Only populated when fetchType=FETCH

Number of rows returned

Total rows without pagination

Formaturi

URI of stored data

Only populated when fetchType=STORE