Pacing and failures
How often alerts go out, and what happens when Slack, Discord or the mail service fails.
How often alerts go out
Alerts are made to be read by people, so Dataflow keeps them few and in order:
- One failure alert an hour. A channel gets at most one alert per hour for each project and each of these events:
run.failed,run.paused,run.error_rate_exceeded,run.slow,run.empty,credits.insufficient,schedule.skipped,source.unreachableanddelivery.failed. The hour starts with the alert that was sent. The ones that follow within the hour are not sent, but counted: the next one sent after the hour says how many were held back, in its message and indata.suppressed_count. Other events (run.completed,run.started,project.auto_disabled…) are always sent. Each channel counts on its own: a project alerting two channels sends to both. - One message a second per channel. Messages to one channel go out one after the other, about one a second, as Slack and Discord ask: a burst of runs ending together, 50 scheduled runs for instance, is delivered in order over a minute instead of being refused. Emails follow the same pace, per channel.
- Never twice. Each alert has the event's
id: an event sent again for any reason (a retry, a restart) never reaches a channel twice.
Destinations are not held back nor paced: a destination receives every event of its topics.
When a channel fails
What happens depends on what Slack, Discord or the mail service answered.
| Answer | What happens |
|---|---|
| The service is down: an error on its side, a timeout, too many requests | The channel pauses. failing_since is when it started, retry_at is when it is tried again: after 1 minute, then 10 minutes, 1 hour, 6 hours and 24 hours. The first try that goes through turns it back on. |
The channel is gone: Slack or Discord answers 401, 403, 404 or 410 (the webhook was deleted or revoked), or an email recipient is inactive or invalid | The channel is turned off at once. disabled_at is set, disabled_reason is rejected and last_error says what to fix. |
While a channel is paused, its alerts are not sent later: a pile of old messages would arrive hours late. missed_count counts them. The try that turns the channel back on is an "Alerts are back" message: it tells you how long the service was down and names up to 10 of the alerts you missed. All the runs are in the dashboard.
If the service is still down after the last try, about 31 hours later, the channel is turned off with disabled_reason set to unreachable.
When a channel is turned off, your other channels that work are told. If none of them is an email channel, the workspace's owners and admins get an email.
To turn a channel back on yourself, paused or turned off, re-enable it. This clears its errors and missed alerts. In the dashboard, it is Turn back on in the channel's menu. Then send a test.
curl -X POST https://dataflow.piloterr.com/v1/alert-channels/CHANNEL_ID/enable -H "x-api-key: YOUR_API_KEY"The answer is the channel. A deleted Slack or Discord webhook fails again right after you re-enable it. Create a new webhook and add it as a new channel instead.