-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Alerts blocked from reaching notification channel when templating issues happen #2857
Description
What did you do?
When defining a receiver in AlertManager, we use a template variable 'connect.k8s.url' and reference it in the receiver actions. The variable, by an honest mistake, did not exist / was not defined.
What did you expect to see?
Expected for the receiver to push the alert through its notification channel, even if some template variable is non existent/not defined.
What did you see instead? Under which circumstances?
The alert blackholed (didn't go through the receiver endpoint), troubleshooting was cumbersome but eventually we found an entry in the log with the following message:
msg="Notify for alerts failed" num_alerts=1 err="connect_slack-connect-alert-validation_production/slack[0]: notify retry canceled due to unrecoverable error after 1 attempts: template: :1:12: executing "" at <>: template "connect.k8s.url" not defined"
Environment
Grafana Cloud Production Instance
- System information:
Grafana Cloud Hosted Alert Manager - Alertmanager version:
Grafana Cloud Hosted Alert Manager - latest version