Slack alerts
Connect Slack to a workspace, post alerts to a channel, and what the log shows when a message fails.
Last reviewed
On this page
The Slack channel posts alerts to a channel you choose, through a Slack app that a workspace Admin or Owner installs once. This page covers the install, the channel list, what is posted and the errors the log can show. The rules that decide when an alert is sent are on the alert rules page.
Connect Slack to the workspace
Slack is connected once per OctoPing workspace, and one OctoPing workspace connects to one Slack workspace. Connecting takes an Admin or an Owner. Until Slack is connected, the Slack option in the notification form is disabled and labelled Slack (Not connected). Admins and Owners see a link to Settings, and everyone else sees a note that an admin has to connect it first.
Open Settings and find Slack Integration
It's a card on the workspace's Settings page.
Choose Add to Slack
Slack asks you to approve the app for its workspace. OctoPing requests three permissions: it posts messages as a bot, and it reads the list of public channels and the list of private channels the bot is in.
Return to Settings
The card shows Connected with the Slack workspace name and when it was connected, and the page confirms with Slack connected successfully. If Slack or the approval fails, the page shows an error and nothing changes.
Add a Slack notification
Invite the app to the channel in Slack
In the channel, enter
/invite @OctoPingor mention the app. The app can only post to channels it has joined, public or private.Create the notification
On the site's Notifications page, choose Add Notification and set Notification Type to Slack. Pick the channel in the Slack Channel list.
Choose the triggers and send a test
Choose Send Test. A test message appears in the channel and the result appears on the page.
The Slack Channel list shows every public channel, and the private channels the app has joined. Archived channels are left out. It's sorted by name. When the list is empty, the form says to invite the app to at least one channel. A heartbeat has the same Slack option on its own Notifications page.
What is posted
- Each alert is a Slack message made of blocks. A down alert has the header Site Down Alert and shows the site, the status, the problem, how many checks have failed in a row, the time of the last check, the response time, which locations see the failure and the error details.
- Every message has a View in OctoPing button that opens the site, and a footer that says it was sent by OctoPing.
- The message text, which Slack shows in notifications and to screen readers, is a one-line summary such as Alert: https://example.com is down.
- Heartbeat alerts use their own layout: the heartbeat's name, its status, its expected interval, the last ping received and its description.
Alerts Slack doesn't carry
Slack has a message for every alert except Slow response and HTTP status changed. A Slack notification that reaches either of those alerts is recorded in the log as Failed with the error Unknown notification trigger, followed by the event name. To get those two alerts, add an email, Discord or webhook notification to the same site.
Errors in the log
| Error text | What it means |
|---|---|
| No active Slack integration for this workspace | Slack was disconnected, or was never connected. Reconnect it in Settings. A notification keeps its channel, so reconnecting the same Slack workspace can make it work again without editing it. |
| Slack API error: followed by a code | Slack refused the message and the code is Slack's own. not_in_channel means the app hasn't joined the channel, and channel_not_found means the channel doesn't exist or the app can't see it. |
| Invalid Slack recipients format, or No channel_id in Slack recipients | The channel stored on the notification is unreadable. Edit the notification and pick the channel again. |
Slack messages are sent once. Unlike a webhook, a failed Slack delivery isn't retried, so the next alert is the next attempt.
Disconnect Slack
An Admin or Owner can choose Disconnect on the Slack Integration card. The app asks for confirmation first, because all Slack notifications in the workspace stop working. They aren't deleted. Until Slack is connected again, each one logs Failed.
Related
- DocsAlert rulesHow a failed check becomes an alert: the retry threshold, the repeat interval, the four triggers, recovery, the default notification, the log and what a maintenance window holds back.
- DocsDiscord alertsPost alerts to a Discord channel through a webhook URL: setup, the color of each alert and how failures are logged.
- DocsWebhooksThe JSON payload for every website and heartbeat event, the request headers, how to verify the HMAC signature in Python, Node.js, PHP and Go, and how retries work.
- FeatureWebsite alerts by email, Slack, Discord, webhook and pushChoose where alerts go, how many failures it takes to send one and how often reminders repeat. Recovery messages and a log of every attempt are included.
- GuideSend SSL certificate expiry alerts to SlackConnect Slack, choose how many days ahead to warn, and get a message in your team's channel when a client's certificate is close to expiring.