Alerting docs: add instructions to execute notification template examples (#99275)

This commit is contained in:
Pepe Cano
2025-01-21 10:32:04 +01:00
committed by GitHub
parent d91d729749
commit 9ce9ad1777
2 changed files with 57 additions and 3 deletions
@@ -86,6 +86,12 @@ Here's an example that prints all available notification data from dot (`.`):
{{ end }}
```
You can execute this template by passing the dot (`.`):
```go
{{ template "custom_template" . }}
```
## Alert
`Alert` contains data for an individual alert:
@@ -133,6 +139,12 @@ This example iterates over the list of firing and resolved alerts (`.Alerts`) in
{{ end }}
```
You can run this template by passing the dot (`.`):
```go
{{ template "custom_template" . }}
```
## KV
`KV` is a set of key value pairs, where each key and value is a string.