The Slack integration posts a message to a Slack channel when an incident opens and when it resolves. It uses a Slack incoming webhook: a private URL that posts into one channel.
Before you start
You need permission in your Slack workspace to create an app (or use an existing one) and add a webhook to a channel. To post to a private channel, you must already be a member of it. In LivePulser you need the owner, admin or member role.
Get a webhook URL from Slack
Slack's steps at the time of writing (Slack may change them):
- Go to api.slack.com/apps and create an app in your workspace, or open an existing one.
- In the app's settings, open Incoming Webhooks and turn on Activate Incoming Webhooks.
- Select Add New Webhook to Workspace, choose the channel, and select Authorize.
- Copy the new URL from Webhook URLs for Your Workspace. It looks like
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX.
Treat the URL as a secret: anyone who has it can post to your channel. Slack's own guide is Sending messages using incoming webhooks.
Connect it in LivePulser
- Open Integrations & API and select Slack, or select Slack under Connect a new service in a monitor's alert settings.
- Fill in the fields below.
- Tick Validate with simple message before connecting so LivePulser first posts "LivePulser Slack integration successfully connected to <your team>!" to the channel, then select Connect integration. If Slack refuses that message, nothing is saved.
| Field | Required | What to enter |
|---|---|---|
| Display name | Yes | A name for this connection, up to 100 characters, for example "Slack #ops-alerts". |
| Webhook URL | Yes | The URL you copied from Slack. It must start with https://hooks.slack.com/services/ and have three more parts after that. |
| Channel | No | A channel name such as #alerts (letters, numbers, - and _, up to 80 characters, optional leading # or @). Slack says app webhooks can't override their channel, so this is normally ignored. Create one webhook per channel instead. |
To change the URL later, open the integration from Installed, paste the new URL over the masked one and select Save changes. When you edit a Slack integration, ticking Validate with simple message currently has no effect: no message is sent, so test it afterwards.
Attach it to a monitor
On the monitor's page, select Alerts, select the Slack integration under Integrations, and select Save changes. When you create a monitor, select it in the Alerts step. See How notifications work.
Check that it works
On the monitor's page, select Send test notification. A message titled Incident Alert for TEST: and your monitor's name should appear in the channel. The integration's own Test button posts a sample alert for example.com instead.
What the message contains
| Event | Message |
|---|---|
| Incident opens | Header Incident Alert (SSL/TLS Issue Detected for SSL problems), Affected Monitor, Status DOWN, Detected At (SSL alerts leave out Status), the failure details, and a View Incident button. Footer: Automated alert from LivePulser. |
| Incident resolves | Header Incident Resolved (SSL/TLS Issue Resolved), Affected Monitor, Status UP (SSL alerts leave it out), Resolved At, Incident Duration, "The monitor has recovered and is now operational.", and the same button. |
| Unexpected cron run | A short text message starting with Unexpected run and the monitor name. |
| Domain expiry reminder | A short text message starting with Domain expires soon (or Domain expired) and the monitor name. |
| Certificate expiry reminder | A short text message starting with Certificate expires soon and the monitor name. |
Times are shown in UTC.
Common problems
| What you see | Cause and fix |
|---|---|
| Please enter a valid URL | The Webhook URL field doesn't contain a URL. Paste the whole address, starting with https://. |
| webhook_url must be a hooks.slack.com URL, invalid Slack webhook path format or invalid Slack webhook token segments | The URL isn't a complete Slack incoming webhook. Check that it uses https, is on hooks.slack.com, has the form /services/<part>/<part>/<part> and wasn't cut short. |
| invalid channel format | The Channel value has spaces or other symbols. Use letters, numbers, - and _, with an optional leading # or @, or leave it empty. |
| Validation failed: unable to send message to Slack webhook | Slack refused the validation message. Check that the webhook still exists in Slack. |
| Slack #ops-alerts: slack webhook returned status <code> | Shown after Send test notification, with your Display Name and the status code Slack returned. Slack no longer accepts the webhook, usually because it or the app was removed. Create a new webhook and paste it into the integration. |
| Alerts stopped arriving | If the webhook was revoked or the channel archived in Slack, LivePulser stops sending and the integration shows Not delivering with the reason. Create a new webhook, paste it into the integration, select Save Changes and send a test. |