10.1Add an alert channel
You manage channels under alerting → channels. Selecting alerting in the top navigation opens channels first.
- Select alerting, then channels.
- Select + new channel. If your team has no channels yet, select + add a channel instead. The New alert channel panel opens.
- Choose a type. Slack is selected when the panel opens. The types are listed in the table below.
- Enter a Name you will recognise later, for example
ops-team. - Fill in the fields for the type. Sections 10.2 to 10.8 describe them.
- Select Create channel. The button stays greyed out until the name and the required fields are filled in and look correct.
Credential fields, such as URLs, tokens and keys, are hidden while you type. Select show next to a field to check what you typed. When the channel is created, the panel closes and the new channel opens in the editor. The editor does not show the credentials again (10.10). If something is wrong, the error shows in red at the bottom of the panel. Select Cancel or press esc to close the panel without saving.
| Type | What you need | Section |
|---|---|---|
| One email address | 10.2 | |
| Slack | A Slack incoming webhook URL | 10.3 |
| Microsoft Teams | A Teams Workflows URL | 10.4 |
| Discord | A Discord channel webhook URL | 10.5 |
| Telegram | A bot token and a chat ID | 10.6 |
| PagerDuty | A PagerDuty Events API V2 integration key | 10.7 |
| Pushover | A Pushover application API token and a user key | 10.11 |
| Webhook | An https:// URL on your own system | 10.8 |
Attach the channel to monitors#
A channel gets alerts only from the monitors it is attached to. You can attach it in two places:
- In the channel editor. Under pages these monitors, select a monitor to attach it. Select it again to detach it. Each change is saved at once.
- In the monitor form. Under on failure — notify, select the channels this monitor should alert. This block appears only when your team has at least one channel.
If a monitor has no channels, its page warns: "No alert channels — a failure here pages nobody". The overview also shows "No notification channel — alerts have nowhere to go." when your team has monitors but no channels.
Rules for all channels#
- The Name is required. It cannot contain line breaks or other control characters.
- A team can have at most 200 alert channels. From 80% of that, the dashboard shows a banner with your count. At 200, delete a channel you no longer use before you add a new one.
- Every URL (Slack, Teams, Discord and Webhook) must start with
https://. Otherwise the form showsMust be an https URL. It can be at most 8192 bytes long. It must point to a public address, not to a private or internal network.
When a value is refused, the message starts with invalid input: and names the field. For example: invalid input: slack_webhook_url must be an https URL. Before you save, the dashboard also shows "Must be an https URL" under a URL field that does not start with https://.
Use the API#
Each type has its own create call in MonitorConfigService. Each call returns the new channel as {"channel": {...}}. Chapter 13 shows how to create an API key and make requests.
| Type | Call | Fields |
|---|---|---|
CreateEmailChannel | name, emailTo | |
| Slack | CreateSlackChannel | name, slackWebhookUrl |
| Microsoft Teams | CreateTeamsChannel | name, teamsWebhookUrl |
| Discord | CreateDiscordChannel | name, discordWebhookUrl |
| Telegram | CreateTelegramChannel | name, telegramBotToken, telegramChatId |
| PagerDuty | CreatePagerDutyChannel | name, pagerdutyRoutingKey, optional pagerdutyEu |
| Pushover | CreatePushoverChannel | name, pushoverUserKey, pushoverAppToken |
| Webhook | CreateWebhookChannel | name, webhookUrl, optional webhookHeaders, webhookSecret |
export OBSRVLY_KEY=obs_...
export OBSRVLY_API=https://www.obsrvly.com/api/gwcurl -s \
"$OBSRVLY_API/monitor/obsrvly.v1.MonitorConfigService/CreateSlackChannel" \
-H "Authorization: Bearer $OBSRVLY_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "ops-team",
"slackWebhookUrl": "https://hooks.slack.com/services/..."}'ListAlertChannelsreturnschannelsandnextCursor. Sendlimit(default 50, at most 200) andcursorfor the next page.GetAlertChanneltakes the channelid.- To attach channels to a monitor, call
UpdateMonitorwithalertChannelIdsandreplaceAlertChannels: true. WithoutreplaceAlertChannels: true, the list is ignored. - A monitor can only use channels of its own team. Otherwise you get
invalid input: alert_channel_ids contains a channel this team doesn't own. - At the 200-channel limit, create calls fail with
team channel limit reached: a team can hold at most 200 alert channels; delete one it no longer uses.