Source
id: unreliable-flow
namespace: company.team
tasks:
- id: fail
type: io.kestra.plugin.scripts.shell.Commands
commands:
- exit 1
errors:
- id: alert_on_failure
type: io.kestra.plugin.notifications.zenduty.ZendutyAlert
url: https://www.zenduty.com/api/events/{{ secret('ZENDUTY_INTEGRATION_KEY') }}/
payload: |
{
"alert_type": "info",
"message": "This is info alert",
"summary": "This is the incident summary",
"suppressed": false,
"entity_id": 12345,
"payload": {
"status": "ACME Payments are failing",
"severity": "1",
"project": "kubeprod"
},
"urls": [
{
"link_url": "https://www.example.com/alerts/12345/",
"link_text": "Alert URL"
}
]
}
About this blueprint
Notifications
This flow sends an alert to Zenduty when a flow fails. The only required input is an integration key string value.
Check the Zenduty documentation to learn how to create an API integration and generate the key. The API integration will send an API call that follows the format: curl -X POST https://www.zenduty.com/api/events/[integration-key]/ -H 'Content-Type: application/json' -d '{"alert_type":"critical", "message":"Some message", "summary":"some summary", "entity_id":"some_entity_id"}'
. The message
and summary
parameters are required. The alert_type
parameter is the severity of the issue, including info
, warning
, error
, or critical
.
More Related Blueprints