Blueprints

Send an alert to Zenduty when any flow fails in the company namespace

Source

yaml
id: zenduty-failure-alert
namespace: system

tasks:
  - id: send_alert
    type: io.kestra.plugin.notifications.zenduty.ZendutyExecution
    url: https://www.zenduty.com/api/events/{{ secret('ZENDUTY_INTEGRATION_KEY') }}/
    executionId: "{{ trigger.executionId }}"
    message: Kestra workflow execution {{ trigger.executionId }} of a flow {{
      trigger.flowId }} in the namespace {{ trigger.namespace }} changed status
      to {{ trigger.state }}

triggers:
  - id: failed_prod_workflows
    type: io.kestra.plugin.core.trigger.Flow
    conditions:
      - type: io.kestra.plugin.core.condition.ExecutionStatus
        in:
          - FAILED
          - WARNING
      - type: io.kestra.plugin.core.condition.ExecutionNamespace
        namespace: company
        prefix: true

About this blueprint

Notifications

This flow sends an alert to Zenduty when a production 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: bash 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. This kestra task abstracts away raw API calls and only requires the integration key, which you can store as a Secret. The default value is error. Visit the Zenduty Events API documentation for more details.

Zenduty Execution

Flow

Execution Status

Execution Namespace

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra