The Discord integration posts a message to a Discord channel when an incident opens and when it resolves. It uses a Discord webhook, a private URL that posts into one channel.
Before you start
You need the Manage Webhooks permission on the Discord server. In LivePulser you need the owner, admin or member role.
Get a webhook URL from Discord
Discord's steps at the time of writing (Discord may change the labels):
- Open Server Settings and go to Integrations.
- Create a new webhook. Give it a name, such as LivePulser, and choose the channel it posts to.
- Select Copy Webhook URL. It looks like
https://discord.com/api/webhooks/<id>/<token>.
Anyone with this URL can post to the channel, so keep it private. Discord's help article is Intro to Webhooks.
Connect it in LivePulser
- Open Integrations & API and select Discord, or select Discord under Connect a new service in a monitor's alert settings.
- Enter a Display name (up to 100 characters) and paste the Webhook URL.
- Tick Validate with simple message before connecting and select Connect integration. LivePulser first posts "LivePulser Discord integration successfully connected to <your team>!"; if Discord refuses it, nothing is saved.
LivePulser accepts only https URLs on discord.com or discordapp.com with the path /api/webhooks/<id>/<token>, where the ID and token are each 10 to 128 characters.
Attach it to a monitor
On the monitor's page, select Alerts, select the Discord integration under Integrations, and select Save changes. To alert several channels, create a webhook for each and connect each one separately.
Check that it works
On the monitor's page, select Send test notification. A message from LivePulser for TEST: and your monitor should appear in the channel. The integration's own Test button posts a sample alert for example.com instead.
What the message contains
Messages are posted as LivePulser with an embed. When an incident opens, the embed is titled Incident Alert (SSL/TLS Issue Detected for SSL problems) and shows Affected Monitor, Status, the detection time, the error, and a View Incident link. On recovery it's titled Incident Resolved and adds Incident Duration. An unexpected cron run posts a short Unexpected run embed, a domain expiry reminder posts a short Domain expires soon or Domain expired embed, and a certificate expiry reminder a short Certificate expires soon embed.
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 from Discord. |
| webhook_url must be a discord.com or discordapp.com URL, invalid Discord webhook path format or invalid Discord webhook ID/token segments | The URL isn't a full Discord webhook URL. Use the https://discord.com/api/webhooks/... address (a channel or invite link doesn't work) and check that it wasn't cut off. |
| Validation failed: unable to send message to Discord webhook | Discord refused the validation message. The webhook was probably deleted. Create a new one and paste it in. |
| My Discord: discord webhook returned status <code> | Shown after Send test notification, with your Display Name and Discord's status code. The webhook was probably deleted. Create a new one and paste it into the integration. |
| Alerts stopped arriving | If someone deleted the webhook in Discord, 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. |