Files
Pulse/docs/WEBHOOKS.md
rcourtman 3f0808e9f9 docs: comprehensive core and Pro documentation overhaul
- Major updates to README.md and docs/README.md for Pulse v5
- Added technical deep-dives for Pulse Pro (docs/PULSE_PRO.md) and AI Patrol (docs/AI.md)
- Updated Prometheus metrics documentation and Helm schema for metrics separation
- Refreshed security, installation, and deployment documentation for unified agent models
- Cleaned up legacy summary files
2026-01-07 17:38:27 +00:00

2.3 KiB

🔔 Webhooks

Pulse includes built-in templates for popular services and a generic JSON template for custom endpoints.

🚀 Quick Setup

  1. Go to Alerts → Notification Destinations.
  2. Click Add Webhook.
  3. Select service type and paste the URL.

📝 Service URLs

Service URL Format
Discord https://discord.com/api/webhooks/{id}/{token}
Slack https://hooks.slack.com/services/...
Teams https://{tenant}.webhook.office.com/webhookb2/{webhook_path}
Teams (Adaptive Card) https://{tenant}.webhook.office.com/webhookb2/{webhook_path}
Telegram https://api.telegram.org/bot{bot_token}/sendMessage?chat_id={chat_id}
PagerDuty https://events.pagerduty.com/v2/enqueue
Pushover https://api.pushover.net/1/messages.json
Gotify https://gotify.example.com/message?token={token}
ntfy https://ntfy.sh/{topic}
Generic https://example.com/webhook

🎨 Custom Templates

For generic webhooks, use Go templates to format the JSON payload.

Variables (common):

  • {{.ID}}, {{.Level}}, {{.Type}}
  • {{.ResourceName}}, {{.ResourceID}}, {{.ResourceType}}, {{.Node}}
  • {{.Message}}, {{.Value}}, {{.Threshold}}, {{.Duration}}, {{.Timestamp}}
  • {{.Instance}} (Pulse public URL if configured)
  • {{.CustomFields.<name>}} (user-defined fields in the UI)

Convenience fields:

  • {{.ValueFormatted}}, {{.ThresholdFormatted}}
  • {{.StartTime}}, {{.Acknowledged}}, {{.AckTime}}, {{.AckUser}}

Template helpers: title, upper, lower, printf, urlquery/urlencode, urlpath

Service-specific notes:

  • Telegram: include chat_id in the URL query string.
  • Telegram templates: {{.ChatID}} is populated from the URL query string.
  • PagerDuty: set routing_key as a custom field (or header) in the webhook config.
  • Pushover: add app_token and user_token custom fields (required).

Example Payload:

{
  "text": "Alert: {{.Level}} - {{.Message}}",
  "value": {{.Value}}
}

🛡️ Security

  • Private IPs: By default, webhooks to private IPs are blocked. Allow them in Settings → System → Network → Webhook Security.
  • Headers: Add custom headers (e.g., Authorization: Bearer ...) in the webhook config.