Notifications
Belay tells people what a schedule did: its batch finished, or it could not start. A batch that a person or an agent starts tells nobody, since whoever started it is already watching.
Notifications have two parts:
- A destination is somewhere a message can go. The organization keeps a list of them. An Admin manages it.
- Each schedule chooses which destinations it tells, and when to tell each. Anyone who can edit the schedule chooses.
Destinations
Section titled “Destinations”Open Notifications in the organization’s settings. To add one, choose its kind, name it, and choose Add destination.
An email destination is a named list of people, such as “QA team”. Add:
- Members of your organization, with Add member. They need no confirmation.
- Any other address, such as a team’s mailing list, with Add address. Belay sends that address one email asking to confirm it, and nothing else until it is confirmed.
Each person on the list shows where they stand: a member, confirmed, waiting to confirm, or unsubscribed. Send again resends a confirmation that has not been answered, at most once an hour.
Every notification email has a link to unsubscribe. Someone who unsubscribes stops getting that destination’s emails; the others on it still get theirs. Only that person can subscribe again.
If emails to an address bounce, or the recipient marks one as spam, Belay stops sending to that address, and the page says so.
A Slack destination posts to one Slack conversation.
- In Slack, create an incoming webhook for the conversation the messages should go to.
- In Belay, choose Slack, name the destination, and paste the address Slack gave you.
Webhook
Section titled “Webhook”A webhook destination sends a signed JSON request to your own endpoint, for a deploy pipeline, an on-call tool, or anything else you run. Belay shows the webhook’s signing secret once, right after you add it. See Webhooks for the request and how to verify it; Message format, under the form, is a short form of that page.
Test, edit, and delete
Section titled “Test, edit, and delete”Send a test sends a test message to the destination, so you can see it arrive. Nothing runs. A destination can be tested once every ten minutes, and an email destination needs someone on it who can be reached: a member, or a confirmed address.
Edit renames a destination or deletes it. Schedules that told a deleted destination stop telling it.
The address of a Slack or webhook destination is never shown again after you add it; the page shows only where it posts.
What a destination shows
Section titled “What a destination shows”Under each destination’s name, a few labelled rows:
- Address: a short form of a Slack or webhook destination’s address, its host, such as “Slack, hooks.slack.com/…Xy7Q” or “hooks.example.com”. Never the whole address.
- Last email or Last message: what was last sent, and when, such as “Test, 3 minutes ago” or “Batch results, an hour ago”.
- Result: what became of it. “Sent” for an email, “Posted” for Slack, “Received” for a webhook whose endpoint answered with a
2xxstatus. While it waits to be sent, “Waiting to send”, or, when the last try said why it did not get through, “Not sent yet.” for an email, “Not posted yet.” for Slack, or “Not received yet.” for a webhook, then that reason, such as “The endpoint answered 500.”. Otherwise, why it was not sent. - Next try: while it waits to be tried again, when that is.
- Message, for a webhook: Show opens the exact message it was sent. See Seeing what was sent.
What a message says
Section titled “What a message says”A message about a finished batch leads with the news, such as “2 workflows stopped passing”, and then says:
- The project, the schedule, and the environment.
- The batch’s counts: how many workflows passed, did not pass, can’t run, and were cancelled.
- What changed since the last batch: how many workflows stopped passing, are still not passing, and are passing again.
- The first few workflows that did not pass, each with the step it stopped at and why.
- A link to the batch.
Runs that Belay itself interrupted are on a line of their own, and are never reported as workflows that stopped passing.
A message is also sent when a schedule’s time came and the batch could not start, with the reason. See When a time does not start a batch.
When a destination is told
Section titled “When a destination is told”Each schedule sets this for each destination it tells. See Schedules for the three choices. The default tells a destination only when something changed, so a channel does not fill with the same news every night.
What was sent
Section titled “What was sent”The page of a batch that a schedule started ends with Notifications: each destination the schedule told, and for each whether the message was sent, and when, or why it was not.
If a message cannot be delivered, Belay tries again for up to six hours.
An organization can send a limited number of notification emails in any 24 hours. An email over the limit is not sent, and the batch’s page says so.