-
Notifications
You must be signed in to change notification settings - Fork 1
/
failure-alert-slack.yaml
42 lines (36 loc) · 1.33 KB
/
failure-alert-slack.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
id: failure-alert-slack
namespace: system
tasks:
- id: send_alert
type: io.kestra.plugin.notifications.slack.SlackExecution
url: "{{ secret('SLACK_WEBHOOK') }}"
channel: "#general"
executionId: "{{ trigger.executionId }}"
triggers:
- id: on_failure
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.ExecutionStatusCondition
in:
- FAILED
- WARNING
extend:
title: Set up alerts for failed workflow executions using Slack
description: >
This system flow will help you set up alerts for failed workflow executions.
Using this pattern, you can manage alerts on failure in one place.
Here, we send a message to a Slack channel when any workflow execution
fails.
You can further customize that system flow by modifying the `SlackExecution`
task, or by adding more tasks to the flow.
Additionally, you can restrict the flow to only send alerts for specific
namespaces by adding an `ExecutionNamespaceCondition` to the trigger. You
can read more about that in the [Administrator
Guide](https://kestra.io/docs/administrator-guide/monitoring).
tags:
- System
- Notifications
ee: false
demo: false
meta_description: Set up alerts for failed workflow executions using Slack and
system flows in Kestra.