events: triggers -> rules

This commit is contained in:
Jens Langhammer
2021-01-15 16:23:27 +01:00
parent 0b41cb84f0
commit 192dbe05c4
19 changed files with 298 additions and 298 deletions

View File

@ -3,18 +3,18 @@ title: Notifications
---
:::note
To prevent infinite loops (events created by policies which are attached to a Notification rule), **any events created by a policy which is attached to any Notification Trigger do not trigger notifications.**
To prevent infinite loops (events created by policies which are attached to a Notification rule), **any events created by a policy which is attached to any Notification Rules do not trigger notifications.**
:::
## Filtering Events
Starting with authentik 0.15, you can create notification triggers, which can alert you based on the creation of certain events.
Starting with authentik 0.15, you can create notification rules, which can alert you based on the creation of certain events.
Filtering is done by using the Policy Engine. You can do simple filtering using the "Event Matcher Policy" type.
![](./event_matcher.png)
An event has to match all configured fields, otherwise the trigger will not activate.
An event has to match all configured fields, otherwise the rule will not trigger.
To match events with an "Expression Policy", you can write code like so:
@ -27,9 +27,9 @@ return ip_address(request.context["evnet"].client_ip) in ip_network('192.0.2.0/2
## Selecting who gets notified
After you've created the policies to match the events you want, create a "Notification Trigger".
After you've created the policies to match the events you want, create a "Notification Rule".
You have to select which group the generated notification should be sent to. If left empty, the trigger will be disabled.
You have to select which group the generated notification should be sent to. If left empty, the rule will be disabled.
You also have to select which transports should be used to send the notification.
A transport with the name "default-email-transport" is created by default. This transport will use the [global email configuration](../installation/docker-compose#email-configuration-optional-but-recommended).