
Kestra Plugin FreshnessTrigger
CertifiedTrigger on Kestra asset freshness
Kestra Plugin FreshnessTrigger
Trigger on Kestra asset freshness
Polls Kestra EE data assets and fires an execution when an asset has not been updated within the configured maximum staleness.
type: io.kestra.plugin.kestra.ee.assets.FreshnessTriggerExamples
Data Quality Monitoring: Ensure your daily ETL pipelines run successfully by monitoring when critical tables were last updated.
id: stale_data_alert
namespace: company.monitoring
triggers:
- id: check_trips_freshness
type: io.kestra.plugin.kestra.ee.assets.FreshnessTrigger
assetId: trips
namespace: company.team
maxStaleness: PT26H # Allow 2 extra hours buffer
checkInterval: PT1H
tasks:
- id: send_alert
type: io.kestra.plugin.slack.notifications.SlackIncomingWebhook
url: "{{ secret('SLACK_WEBHOOK') }}"
payload: |
{
"text": "⚠️ Asset `{{ trigger.assets[0].id }}` is stale. Last updated: {{ trigger.assets[0].lastUpdated }}"
}
SLA Enforcement: Contractual SLAs require mart tables to be updated every 4 hours during business hours.
id: sla_enforcement
namespace: company.data
triggers:
- id: mart_freshness_check
type: io.kestra.plugin.kestra.ee.assets.FreshnessTrigger
assetType: io.kestra.plugin.ee.assets.Table
namespace: company.data
metadataQuery:
- field: model_layer
type: EQUAL_TO
value: mart
maxStaleness: PT4H
checkInterval: PT30M
tasks:
- id: trigger_refresh
type: io.kestra.plugin.core.flow.Subflow
namespace: company.data
flowId: refresh_mart_tables
inputs:
table_id: "{{ trigger.assets[0].id }}"
Multi-Region Freshness Monitoring: Monitor production assets across multiple regions, excluding archived or test assets, focusing on critical items.
id: multi_region_freshness
namespace: company.monitoring
triggers:
- id: regional_freshness_check
type: io.kestra.plugin.kestra.ee.assets.FreshnessTrigger
assetType: io.kestra.plugin.ee.assets.Table
maxStaleness: PT12H
checkInterval: PT1H
metadataQuery:
- field: environment
type: EQUAL_TO
value: prod
- field: config.region
type: IS_ONE_OF
value: [us-east-1, us-west-2, eu-west-1]
- field: status
type: IS_NOT_ONE_OF
value: [archived, test]
- field: description
type: CONTAINS
value: critical
tasks:
- id: alert_stale_regional_assets
type: io.kestra.plugin.slack.notifications.SlackIncomingWebhook
url: "{{ secret('OPS_WEBHOOK') }}"
payload: |
{
"text": "⚠️ Regional asset `{{ trigger.assets[0].id }}` in {{ trigger.assets[0].metadata['config.region'] }} is stale"
}
Properties
maxStaleness *string
Maximum allowed time since last update (e.g., PT24H, P1D)
allowConcurrent boolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
assetId string
Asset id to monitor
assetType string
Asset type to filter by
auth
Select API authentication
Use either an API token or HTTP Basic (username/password); do not provide both.
io.kestra.plugin.kestra.AbstractKestraTrigger-Auth
API token for bearer auth
trueAutomatically retrieve credentials from Kestra's configuration if available
The default configuration can be configured globally inside the Kestra configuration file:
- Set
kestra.tasks.sdk.authentication.api-tokento use an API token - Set
kestra.tasks.sdk.authentication.usernameandkestra.tasks.sdk.authentication.passwordfor HTTP basic authentication - Set
kestra.tasks.sdk.authentication.urlto also default the Kestra API endpoint (seekestraUrlabove) The Enterprise edition also provides setting a default configuration at the Namespace or Tenant level by an administrator. Set to false to also opt out of the default URL, and to call a Kestra API that requires no authentication when no credentials are set either.
Password for HTTP Basic auth
Username for HTTP Basic auth
interval string
PT1HdurationHow often the trigger should check for stale assets. Default is 1 hour
kestraUrl string
Override Kestra API endpoint
URL used for calls to the Kestra API. When null, falls back to the url configured alongside the default SDK authentication (Namespace or Tenant level, Enterprise edition), then renders {{ kestra.url }} from configuration; if still empty, defaults to http://localhost: 8080. Trailing slashes are stripped before use.
metadataQuery array
Metadata field queries to filter assets by
io.kestra.plugin.kestra.ee.assets.FieldQuery
EQUAL_TONOT_EQUAL_TOnamespace string
Namespace to filter assets by
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
tenantId string
Override target tenant
Tenant identifier applied to API calls; defaults to the current execution tenant.
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.
Outputs
assets array
List of stale assets
io.kestra.plugin.kestra.ee.assets.FreshnessTrigger-AssetWithStaleInfo
date-time^[a-zA-Z0-9][a-zA-Z0-9._:-]*1150^[a-z0-9][a-z0-9._-]*1150duration1