Send alerts to Slack, Discord, Telegram or email
SrvYard tells people about things that happen: a deployment failed, a certificate is about to expire, a backup did not finish, a monitor crossed its threshold. By default that happens by email and in the bell menu. Notification channels add the places where your team already looks: a Slack channel, a Discord server, a Telegram group or a shared mailbox.
This article shows how to add a channel, how to choose which events and how serious they must be, how to limit a channel to some servers or sites, how the Test button and the message log help you find problems, and how to set the defaults members start with. Sites can also have channels of their own for their deployments, covered at the end. If you want signed JSON sent to your own software instead, that is a different feature: see Outgoing webhooks and delivery history.
Before you begin
- Permission to manage notifications in the organisation. Other members can see the channels but not change them.
- The address of the destination. For Slack, an incoming webhook URL (in Slack: Apps, Incoming Webhooks, on
hooks.slack.com). For Discord, a webhook URL (ondiscord.com). For Telegram, a bot token from@BotFatherand the ID of the chat. For email, the addresses. - A limit to know about. An organisation can have 20 channels, and an email channel can have up to 20 addresses.
1. Open the Channels card
Open Organization settings from the sidebar and choose Notifications. The Channels card is below Deployment failed emails.
- Add channel. Opens the panel for a new channel.
- A channel row. The name, the type, where it sends to (a host name, a chat or the number of addresses), how many Events it hears, its Filters (the severity and the scope) and the result of the Last message.
- On. The switch turns the channel on and off without deleting it.
- Test. Sends a test message to that channel right now and shows the result next to the row.
- Error text. When the last message failed, the reason is shown under Failed. Here Telegram answered 401 because the bot token had been revoked: create a new token and edit the channel.
The three-dot menu at the end of the row has Edit and Delete. Under the table, Recent messages unfolds a log of what each channel sent and with what result. Entries and delivery records are kept for 30 days.
2. Add a channel
Press Add channel. Start with the type.
- Type. Slack, Discord, Telegram or Email. The fields below change with the type.
- Name. A label for you, such as
#ops-alerts. - Incoming webhook URL. For Slack and Discord the webhook address. The address has to be on the provider's own host (
hooks.slack.comfor Slack). The address is stored encrypted, shown only as a short hint afterwards, and never displayed again. When you edit a channel, leave the field empty to keep the stored address. - Events. All events includes events that SrvYard adds in the future. Switch it off to pick events (see below).
- Severity. Everything, Warnings and errors or Errors only. Each event has a severity: a failed deployment is an error, a certificate that is about to expire a warning, a successful deployment a success.
- Limit to. Empty means the whole organisation. Otherwise choose Servers, Sites or Tags; an event reaches the channel when its server, its site or one of their tags is ticked.
Press Add channel at the bottom of the panel, then Test on the new row.
Telegram needs more
Choose Telegram in Type and the address field is replaced by a bot token, a chat and an optional topic.
- Type. Telegram shows Bot token (create a bot with
@BotFatherand add it to the chat or channel), Chat ID (a number such as-1001234567890, or@channelname) and Topic ID (optional) for forum groups.
An Email channel shows an Email addresses box instead. Addresses of members of the organisation work at once. Any other address gets a confirmation email first and receives nothing until the person opens the link. The edit panel shows each address as Confirmed or Waiting, with a button to send the confirmation again.
Choose events
Switch off All events to see the event list.
- All events switch. Off shows a search box and the events in groups: Servers, Sites, Deployments, Certificates and domains, Backups and snapshots, Monitoring, Databases, Recipes and imports, and Team and access. Tick a group to take every event in it, or single events. Each shows its key in small type, for example
server.disconnected, which is also what webhooks and the API use.
Make two channels instead of one noisy one. Send Errors only from everything to the team channel, and send Everything for one important production site to its own channel.
3. What gets sent, and what does not
- One message per event. Slack, Discord and Telegram receive a formatted message with a link back to the server or site. Names and error text are escaped for each platform, and mentions such as
@everyoneare made harmless. - No secrets. Messages carry names, links, statuses and times. Passwords, tokens and environment values are never included.
- A busy channel is summarised. More than 20 messages a minute to one channel are combined into one digest message.
- Failed sends are retried. A message that meets a rate limit (HTTP 429) or a server error (5xx) is tried again up to three times. Other errors, such as a revoked token, are not, and show as Failed with the reason.
4. Set what members receive by default
Further down the page, Deployment failed emails and Defaults for members control the personal notifications.
- Email switch of an event, here Server monitor alert.
- In-app switch of the same event. In-app means the bell menu and the notification centre.
- A row. Each event has a name and a sentence about when it fires, grouped under Server, Site and Organization.
These are only starting points. Every member can change their own table in their account settings, as described in Alert thresholds and silencing. Deployment failed emails adds extra addresses that are told about failed deployments next to the owners and admins.
5. Channels for one site
A site can send its own deployment events to channels of its own. Open the site, choose Settings and then Notifications.
- Email when a deployment fails. Emails go to the person who started the deployment and to the owners and admins of the organisation. It includes failed health checks. Emails for successful deployments are not available.
- Add channel. The site's Channels card sends this site's deployment events to Slack, Discord, Telegram, a signed webhook or a list of emails. A site can have up to 10.
Troubleshooting
- Test says "Failed" with a 401 or 403. The token or webhook was revoked or is wrong. Create a new one at the provider and Edit the channel to replace it.
- Telegram sends nothing to a group. The bot must be added to the group, and the chat ID of a group starts with a minus sign. For a forum group fill in the topic.
- Nothing arrives, but Test works. The filters are too narrow. Check Events, Severity and Limit to. An event only reaches a channel when its server, site or tag is in the scope.
- A colleague does not get the email channel. Addresses of people who are not members of the organisation need to confirm first. Look for Waiting next to the address and press the button to send the confirmation again.
- I added 20 channels and cannot add more. That is the limit. Combine channels, or delete the ones you no longer use.
- A channel stopped by itself. Check the On switch and the Last message. The log under Recent messages shows what happened.
Related
- Alert thresholds and silencing: the monitors that raise server alerts, and personal mute switches.
- Slack and Discord notifications: create the webhook in each app.
- Outgoing webhooks and delivery history: signed JSON for your own systems.
- Heartbeats and uptime checks: the missed-heartbeat events these channels can carry.