Skip to content

Discord

Send alerts to a Discord channel using a server webhook.

Setup

  1. In Discord, open Server Settings → Integrations → Webhooks → New Webhook
  2. Choose the channel, set a name and avatar, click Copy Webhook URL

Adding a Discord channel

wnp notify add-channel <check-id> \
  --type discord \
  --config url=https://discord.com/api/webhooks/...
curl -X POST https://api.wanepia.com/v1/checks/{check_id}/policy/channels \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_type": "discord",
    "config": {
      "url": "https://discord.com/api/webhooks/..."
    }
  }'

Payload format

Wanepia sends a Discord embed:

{
  "embeds": [
    {
      "title": "payments-api — DOWN",
      "description": "Status changed: **up → down**\nReason: 3 consecutive failures",
      "color": 15158332
    }
  ]
}
Status Colour (decimal)
down 15158332 (red)
degraded 15844367 (yellow)
up 3066993 (green)

Troubleshooting

  • Discord webhooks have a rate limit of ~30 requests / minute per webhook. If you have many entities and a short cooldown, consider raising cooldown_seconds.
  • Use wnp notify logs to see delivery status and error messages.