Google Cloud Trigger

Google Cloud Trigger

Certified

Trigger on Cloud Monitoring results

Polls Cloud Monitoring every interval (default 60s) with the filter over window (default 5m). Starts a Flow execution when at least one time series is found and exposes series and count in the trigger output. Requires Monitoring access on the target project; supports custom service accounts and scopes.

yaml
type: io.kestra.plugin.gcp.monitoring.Trigger

Trigger when a Cloud Monitoring query returns non-empty results

yaml
id: gcp_monitoring_trigger
namespace: company.team
tasks:
  - id: each
    type: io.kestra.plugin.core.flow.ForEach
    values: "{{ trigger.series }}"
    tasks:
      - id: log
        type: io.kestra.plugin.core.log.Log
        message: "Metric: {{ fromJson(taskrun.value) }}"

triggers:
  - id: watch
    type: io.kestra.plugin.gcp.monitoring.Trigger
    interval: "PT1M"
    projectId: "gcp-project-id"
    filter: 'metric.type="compute.googleapis.com/instance/cpu/utilization" AND resource.type="gce_instance"'
    window: PT5M
Properties

Filter expression

Cloud Monitoring filter string evaluated each poll; the trigger fires only when it returns at least one time series

Defaultfalse

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

DefaultPT1M
Formatduration

Polling interval

Duration between query runs; defaults to 60 seconds

Project ID

Google Cloud project that holds the monitored metrics

SubTypestring
Default["https://www.googleapis.com/auth/cloud-platform"]

OAuth scopes

Scopes used when building credentials; defaults to https://www.googleapis.com/auth/cloud-platform

Service account

Optional service account email to authenticate the Monitoring client; falls back to application default credentials

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.

DefaultPT5M

Query window

Lookback duration for the filter; defaults to 5 minutes

Total number of time series fetched

Count of time series returned by the Cloud Monitoring query

SubTypeobject

List of time series

Raw Cloud Monitoring time series in JSON form