Back to docs
Concepts

Notifications & Alerting

Dagy can notify external systems when runs reach terminal states or SLAs are breached, via configurable **channels** and **alert rules**.

Channels

A channel is a delivery destination for an organization, stored in dagy-notification-channels-<env>. Supported channel_type values (see src/dagy_api/notifications.py):

TypeConfig keysDelivery
slackwebhook_url (or url)POST to a Slack incoming webhook
emailfrom_email/source, recipientsAmazon SES send_email
webhooktarget URLsigned HTTP POST with the event payload
pagerdutyrouting/integration keyPagerDuty Events API

Unknown types are rejected with unsupported channel type. Set the dry-run env flag to log instead of sending during testing.

Alert rules

An alert rule (stored in dagy-alert-rules-<env>) binds a trigger (e.g. run failure, SLA breach) to one or more channel_ids, optionally scoped to a flow_name and with an sla_seconds threshold.

Dispatch

evaluate_and_dispatch(org_id, run_id, trigger_type, flow_name) is the integration hook: it looks up matching rules, builds a message, and fans out to each channel, returning the number of successful deliveries. Delivery failures are recorded per-channel and do not abort the others. Dispatch uses a bounded HTTP timeout so a slow endpoint cannot hang the caller.

API

CRUD for channels and rules is exposed under the notifications routes; requires notifications.read / notifications.write permissions (see Auth).