From baff8fe39dc4c45c18465c5d33e03687d778c28d Mon Sep 17 00:00:00 2001 From: Michael Kopinsky Date: Mon, 13 Sep 2021 10:29:23 -0400 Subject: [PATCH] Add link to default template (#39106) This would have been useful to me. Perhaps it would be useful to others? --- .../alerting/unified-alerting/message-templating/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/alerting/unified-alerting/message-templating/_index.md b/docs/sources/alerting/unified-alerting/message-templating/_index.md index 6d281ce3cae4..add54eb40ff8 100644 --- a/docs/sources/alerting/unified-alerting/message-templating/_index.md +++ b/docs/sources/alerting/unified-alerting/message-templating/_index.md @@ -8,7 +8,7 @@ weight = 400 # Message templating -Notifications sent via [contact points]({{< relref "../contact-points.md" >}}) are built using templates. Grafana comes with default templates which you can customize. Grafana's notification templates are based on the [Go templating system](https://golang.org/pkg/text/template) where some fields are evaluated as text, while others are evaluated as HTML which can affect escaping. Since most of the contact point fields can be templated, you can create reusable templates and them in multiple contact points. See [template data reference]({{< relref "./template-data.md" >}}) to check what variables are available in the templates. +Notifications sent via [contact points]({{< relref "../contact-points.md" >}}) are built using templates. Grafana comes with default templates which you can customize. Grafana's notification templates are based on the [Go templating system](https://golang.org/pkg/text/template) where some fields are evaluated as text, while others are evaluated as HTML which can affect escaping. Since most of the contact point fields can be templated, you can create reusable templates and them in multiple contact points. See [template data reference]({{< relref "./template-data.md" >}}) to check what variables are available in the templates. The default template is defined in [default_template.go](https://github.com/grafana/grafana/blob/main/pkg/services/ngalert/notifier/channels/default_template.go) which can serve as a useful reference or starting point for custom templates. ## Using templating in contact point fields