New to Kestra?
Use blueprints to kickstart your first workflows.
Send an Opsgenie alert when a Kestra workflow fails. Automate incident creation and on-call notifications for critical production pipeline monitoring.
Automatically open an Opsgenie alert whenever a Kestra workflow execution fails or finishes with a warning. This system flow turns pipeline failures into actionable, on-call incidents by routing alerts to the right team, user, escalation, and schedule, so problems get noticed and resolved instead of sitting silently in a log. It solves the core monitoring gap in data and infrastructure operations: knowing the moment something breaks without watching the UI all day.
The flow is wired to a io.kestra.plugin.core.trigger.Flow trigger that listens to executions across your instance. Two conditions filter what matters: io.kestra.plugin.core.condition.ExecutionStatus fires only on FAILED and WARNING statuses, and io.kestra.plugin.core.condition.ExecutionNamespace limits the scope to the company namespace and all nested child namespaces using a PREFIX comparison.
When a matching execution is detected, the send_notification task of type io.kestra.plugin.opsgenie.OpsgenieExecution posts an alert to Opsgenie. The alert message embeds {{ trigger.executionId }} and {{ taskrun.startDate }}, sets an alias of ExecutionError, assigns P1 priority, attaches tags, and routes to configured responders (team, user, escalation, schedule) and visibleTo audiences by their Opsgenie IDs.
P1 priority and consistent tagging for fast triageOpsgenie raises alerts but has no awareness of your pipeline runs. Kestra closes that gap. The event-driven Flow trigger reacts to execution state changes instantly, with no polling or cron, something Opsgenie cannot do on its own. You get retries, full execution lineage, and a declarative YAML definition that lives in version control. Add one system flow and every current and future workflow under the namespace inherits failure alerting for free.
OPSGENIE_REQUEST: the Opsgenie alert API request URL used by the url property of the send_notification taskOPSGENIE_REQUEST secret to your Kestra instance.responders and visibleTo IDs with your own Opsgenie IDs.ExecutionNamespace condition to match your namespace.ExecutionStatus and ExecutionNamespace conditions.message with namespace, flow ID, or labels from the trigger payload.priority for warnings versus hard failures by splitting into separate routed flows.