
Apache Flink MonitorJob
CertifiedTrigger on Flink job state
Apache Flink MonitorJob
Trigger on Flink job state
Polls a Flink job over REST and triggers a flow when it reaches a terminal state. Uses a 10s polling default and can fail the flow on FAILED states.
type: io.kestra.plugin.flink.MonitorJobExamples
Monitor Flink job and trigger on completion
id: flink-job-monitor
namespace: company.team
triggers:
- id: job-monitor
type: io.kestra.plugin.flink.MonitorJob
restUrl: "http://flink-jobmanager:8081"
jobId: "my-job-id-12345"
interval: "PT30S"
expectedTerminalStates:
- "FINISHED"
- "CANCELED"
failOnError: true
tasks:
- id: notify-completion
type: io.kestra.plugin.core.log.Log
message: "Flink job {{ trigger.jobId }} reached state: {{ trigger.finalState }}"
Properties
jobId *Requiredstring
Job ID
ID of the Flink job to monitor.
restUrl *Requiredstring
Flink REST API URL
Base URL of the Flink REST API (e.g., http://flink-jobmanager: 8081).
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
expectedTerminalStates array
Expected terminal states
Job states treated as success. Defaults to ['FINISHED'].
failOnError booleanstring
trueFail on error
Fail the trigger when the job reaches FAILED. If false, trigger still fires with success=false; defaults to true.
interval string
PT10SPolling interval
Interval between job status checks (ISO-8601 duration, e.g., PT30S). Defaults to PT10S.
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.