Apply templating on alert notifications on OK state (#47355)
* OK notifications using previous evaluation data * copy rule.EvalMatches to avoid changes to the underlying array * test cases added/modified * delete trailing newline * fix double newline in go import * add change to the changelog * specify that this only affects legacy alerting (changelog) * use current eval data instead of prev eval data * create evalMatch just once * code comments, renamings, getTemplateMatches() function * changelog and docs updated
This commit is contained in:
@@ -9,7 +9,9 @@ aliases = ["/docs/grafana/latest/alerting/add-notification-template/"]
|
||||
|
||||
You can provide detailed information to alert notification recipients by injecting alert query data into an alert notification. This topic explains how you can use alert query labels in alert notifications.
|
||||
|
||||
Labels that exist from the evaluation of the alert query can be used in the alert rule name and in the alert notification message fields. The alert label data is injected into the notification fields when the alert is in the alerting state. When there are multiple unique values for the same label, the values are comma-separated.
|
||||
Labels that exist from the evaluation of the alert query can be used in the alert rule name and in the alert notification message fields. The alert label data is injected into the notification fields when the alert is evaluated and the notification is about to be sent. When there are multiple unique values for the same label, the values are comma-separated.
|
||||
|
||||
When the alert is in `firing` state, the data used to parse the templates corresponds to the series that are violating the alert condition at the moment the notification is sent. For `resolved` alert notifications, all series are used since there are none that are violating the condition.
|
||||
|
||||
This topic explains how you can use alert query labels in alert notifications.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user