fix: add Gotify webhook template with required message field

Addresses #342 - Gotify webhooks now include the required 'message' field
that was missing when using generic webhook payloads. The template also
includes proper priority mapping and markdown support.
This commit is contained in:
Pulse Monitor
2025-08-21 22:10:43 +00:00
parent 15eb074f1f
commit 68af332228
@@ -233,6 +233,35 @@ func GetWebhookTemplates() []WebhookTemplate {
}`,
Instructions: "1. In Teams channel, click ... > Connectors\n2. Configure Incoming Webhook\n3. Copy the URL and paste it here\n\nThis uses the modern Adaptive Card format recommended for new implementations.",
},
{
Service: "gotify",
Name: "Gotify",
URLPattern: "https://{your-gotify-server}/message?token={your-app-token}",
Method: "POST",
Headers: map[string]string{"Content-Type": "application/json"},
PayloadTemplate: `{
"message": "{{.Message}}",
"title": "Pulse Alert: {{.Level | title}}",
"priority": {{if eq .Level "critical"}}10{{else if eq .Level "warning"}}5{{else}}2{{end}},
"extras": {
"client::display": {
"contentType": "text/markdown"
},
"pulse::alert": {
"id": "{{.ID}}",
"level": "{{.Level}}",
"type": "{{.Type}}",
"resource_name": "{{.ResourceName}}",
"node": "{{.Node}}",
"value": {{.Value}},
"threshold": {{.Threshold}},
"duration": "{{.Duration}}",
"instance": "{{.Instance}}"
}
}
}`,
Instructions: "1. In Gotify, create a new application\n2. Copy the application token\n3. URL format: https://your-gotify-server/message?token=YOUR_APP_TOKEN\n4. The token must be included in the URL as a parameter",
},
{
Service: "generic",
Name: "Generic JSON Webhook",