Hi,
Grafana v11.5.2 (598e0338d5)
I have a Template for Telegram:
{{- /* Telegram message template */ -}}
{{ define "telegram.test.template" }}
{{ if gt (len .Alerts.Firing) 0 }} {{/* BLOCK FOR ALERTS IN FIRING STATE */}}
⚠️ Warning ⚠️
🚨 Consumption🚨
{{ range .Alerts.Firing }}
The current kWRed consumption has exceeded the established maximum limit kWMaxRed
{{ .Annotations.summary }} {{/* SHOWS THE "SUMMARY" OF THE ANNOTATIONS FOR ALERTS IN FIRING */}}
{{end}}
{{ else if gt (len .Alerts.Resolved) 0 }} {{/* BLOCK FOR ALERTS IN RESOLVED STATE */}}
✅ Solved ✅
{{ range .Alerts.Resolved }}
The excessive consumption alert has returned to normal.
{{ .Annotations.summary }} {{/* SHOWS THE "SUMMARY" OF THE ANNOTATIONS FOR RESOLVED ALERTS */}}
{{end}}
{{end}}
{{end}}
And then in the Alert Summary:
kWRed: {{ printf "%.1f" $values.C.Value }} kW
kWMaxRed: {{ printf "%.1f" $values.D.Value }} kW
Sometimes I receive high consumption alerts but with “nil” values. This is unwanted and confusing because of how the alert is build based on the template and the summary.
This is my configuration in the following section:
From the docs here: State and health of alerts | Grafana documentation It appears that I would need to select Normal option to avoid an alert condition when there is “No Data”? If this is so, what happens when the alert is Firing and a “No Data” is presented that has “Normal” behavior? Does the Alert system consider it resolved when it is actually a “No Data” condition?
I would appreciate any clarification on this. Thank you