You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/using-guardrails/notifications/index.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,8 @@ Guardrails currently supports the following delivery channels for notifications:
19
19
20
20
2.**Slack notifications** are sent via standard webhooks. For documentation on configuring webhooks for slack see: `https://api.slack.com/messaging/webhooks`
21
21
3.**Microsoft Teams notifications** are also sent via webhooks. For Teams documentation see: https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=dotnet
22
-
4.**Event Streams** can be created and consumed using the [Guardrails Firehose](/guardrails/docs/guides/configuring-guardrails/firehose) feature.
22
+
4.**Custom webhook notifications** can be sent to any HTTPS endpoint that accepts POST requests with JSON payloads. This allows integration with custom systems, ticketing platforms, monitoring tools, or any service that provides webhook endpoints. Webhooks support optional authorization headers for secure delivery. Configure webhook delivery using the [Turbot > Notifications > Webhook](https://hub.guardrails.turbot.com/mods/turbot/policies/turbot/notificationsWebhook) policy and optional authentication with the [Turbot > Notifications > Webhook > Authorization Header](https://hub.guardrails.turbot.com/mods/turbot/policies/turbot/notificationsWebhookAuthorizationHeader) policy.
23
+
5.**Event Streams** can be created and consumed using the [Guardrails Firehose](/guardrails/docs/guides/configuring-guardrails/firehose) feature.
23
24
24
25
25
26
### Routing to Profiles
@@ -80,12 +81,14 @@ Here is a base example of two common types of rules:
The first rule sends a notification to an email every time a control changes from `OK` state to `Alarm` state, and the second rule sends a notification when Guardrails takes an enforcement action against a security group rule (the parent of a security group rule is the `securityGroup`)
@@ -106,7 +109,7 @@ Guardrails keeps track of the number of notifications being sent to individual r
106
109
107
110
## Templates
108
111
109
-
Templates control the format of notifications. Separate templates exist for each delivery channel (Email, Slack, Teams) and for each delivery type (single and batch). The default templates for each channel integrate [Guardrails Quick Actions](guides/quick-actions) and serve as a great jumping off point for your own customization. The default templates can be overridden by setting the following policies:
112
+
Templates control the format of notifications. Separate templates exist for each delivery channel (Email, Slack, Teams, Webhook) and for each delivery type (single and batch). The default templates for each channel integrate [Guardrails Quick Actions](guides/quick-actions) and serve as a great jumping off point for your own customization. The default templates can be overridden by setting the following policies:
@@ -130,8 +133,13 @@ Turbot > Notifications > Microsoft Teams > Action Template > Batch Body
130
133
131
134
Turbot > Notifications > Microsoft Teams > Control Template > Body
132
135
Turbot > Notifications > Microsoft Teams > Control Template > Batch Body
136
+
137
+
Turbot > Notifications > Webhook > Action Template > Body
138
+
Turbot > Notifications > Webhook > Control Template > Body
133
139
```
134
140
141
+
**Note**: Webhook notifications do not support batch templates and only send individual notifications.
142
+
135
143
Templates are created using graphql for the query and [Nunjucks](https://mozilla.github.io/nunjucks/templating.html) for the templating language (very similar to calculated policies).
136
144
137
145
For examples and documentation on how to customize templates please see [Templates →](guides/notifications/templates)
@@ -156,6 +164,20 @@ Turbot > Notifications > Email > SMTP Username (if no username is needed s
156
164
Turbot > Notifications > Email > SMTP Password (if no password is needed set to `null`)
157
165
```
158
166
167
+
### Webhook Setup
168
+
169
+
For webhook notifications, configure the following policies:
Turbot > Notifications > Webhook > Action Template > Body - Customize the JSON payload format for action notifications
174
+
Turbot > Notifications > Webhook > Control Template > Body - Customize the JSON payload format for control notifications
175
+
```
176
+
177
+
**Template Configuration**: The sample [Webhook templates](guides/notifications/templates) outputs all available notification data as JSON. This provides the complete data structure that you can then customize by selecting specific fields and formatting them according to your system's requirements. You can also copy Slack templates as a starting point and modify the JSON structure.
178
+
179
+
Webhook notifications are sent as HTTPS POST requests with JSON payloads to the URLs specified in your notification rules.
180
+
159
181
Once notifications are enabled and email is configured we suggest triggering one of your filter rules and ensuring that message delivery works.
160
182
161
183
**Next**: [See how to configure filter rule-sets →](guides/notifications/filter-rules)
0 commit comments