
Google Cloud Trigger
CertifiedTrigger on Cloud Monitoring results
Google Cloud Trigger
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.
type: io.kestra.plugin.gcp.monitoring.TriggerExamples
Trigger when a Cloud Monitoring query returns non-empty results
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 *Requiredstring
Filter expression
Cloud Monitoring filter string evaluated each poll; the trigger fires only when it returns at least one time series
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
interval Non-dynamicstring
PT1MdurationPolling interval
Duration between query runs; defaults to 60 seconds
projectId string
Project ID
Google Cloud project that holds the monitored metrics
scopes array
["https://www.googleapis.com/auth/cloud-platform"]OAuth scopes
Scopes used when building credentials; defaults to https://www.googleapis.com/auth/cloud-platform
serviceAccount string
Service account
Optional service account email to authenticate the Monitoring client; falls back to application default credentials
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
when string
trueA 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.
window string
PT5MQuery window
Lookback duration for the filter; defaults to 5 minutes
Outputs
count integer
Total number of time series fetched
Count of time series returned by the Cloud Monitoring query
series array
List of time series
Raw Cloud Monitoring time series in JSON form