From 21254c3522ea92f0851ac1929c25f190a92fa696 Mon Sep 17 00:00:00 2001 From: Phillip Tarrant Date: Tue, 18 Nov 2025 19:26:12 -0600 Subject: [PATCH] added webhooks and templates to alerting, email is next --- app/web/templates/webhooks/form.html | 266 ++++++++++++++++++++++++++- docs/API_REFERENCE.md | 216 +++++++++++++++++++++- 2 files changed, 477 insertions(+), 5 deletions(-) diff --git a/app/web/templates/webhooks/form.html b/app/web/templates/webhooks/form.html index 5595055..df350c9 100644 --- a/app/web/templates/webhooks/form.html +++ b/app/web/templates/webhooks/form.html @@ -123,6 +123,58 @@
+ +
Webhook Template
+
+ + Customize the webhook payload using Jinja2 templates. Leave empty to use the default JSON format. +
+ +
+ + +
Choose from pre-built templates for popular services
+
+ +
+ + +
Output format of the rendered template
+
+ +
+ + +
+ Available variables: {{ "{{" }} alert.* {{ "}}" }}, {{ "{{" }} scan.* {{ "}}" }}, {{ "{{" }} rule.* {{ "}}" }} + View all variables +
+
+ +
+ + +
Override the default Content-Type header (auto-detected from template format if not set)
+
+ +
+ + +
+ +
+
Advanced Settings
@@ -166,7 +218,7 @@
Help
Payload Format
-

Webhooks receive JSON payloads with alert details:

+

Default JSON payload format (can be customized with templates):

{
   "event": "alert.created",
   "alert": {
@@ -181,6 +233,9 @@
   "rule": {...}
 }
+
Custom Templates
+

Use Jinja2 templates to customize payloads for services like Slack, Discord, Gotify, or create your own format. Select a preset or write a custom template.

+
Authentication Types