Alert not send on slack

Hello
I have an alert that I configured to be sent on slack. The problem is that when the panel goes into alert, the alert is not sent.

Here my alert configuration :

Here my notification policy configuration :

Here my contact point configuration :

Here what in my title template :

{{ define "ingress_alert_title" -}}
{{ if gt (.Alerts.Firing | len) 0 }}🚨 {{ .Alerts.Firing | len }} firing alerts. {{ end }}{{ if gt (.Alerts.Resolved | len) 0 }}✅ {{ .Alerts.Resolved | len }} resolved alerts.{{ end }}
{{ end -}}

Here what in my message template :

{{ define "ingress.firing_and_resolved_alerts" -}}
{{ len .Alerts.Resolved }} resolved alert(s)
{{ range .Alerts.Resolved -}}
{{ template "alert.summary_and_description" . -}}
{{ end }}
{{ len .Alerts.Firing }} firing alert(s)
{{ range .Alerts.Firing -}}
{{ template "alert.summary_and_description" . -}}
{{ end -}}
{{ end -}}
{{ define "alert.summary_and_description" }}
Status: {{ .Status }}
Summary: {{.Annotations.summary}}
Description: {{.Annotations.description}}
{{ end -}}

I specify that when I click on the test button of my contact point, I receive a notification on slack that is:

[ 1 firing alerts.|attachment](https://grafana.djam.ooo/alerting/list)
0 resolved alert(s)1 firing alert(s) Status: firing
Summary: Notification test
Description:

I absolutely do not understand where the problem is.
Is someone have a lead please?

Hi, do you have any other policies that match the labels before your own policy? By default, the first match is the last one. Contact point would still work as expected but alert would no go through.

hummm no each of my contact point has its own notification policy

image

Does this policy have
image

this option checked? If not this policy that matches all alert instances will most probably catch every other alert before and then not match further at all.

So the problem is really weird

When I put the notification policy of another contact point in the alert, I get it on slack.

I try to put the new notification policy in an alert that I usually receive and now I no longer have the notification.

It’s as if the problem is on the notification policy. It’s really weird

I think the policy without any labels that is marked as Matches all alert instances (the one between _transfer_business=TRUE and _cie_prepaid=TRUE) captures all the alerts that weren’t matched before. Therefore policies after that are useless - they won’t be able to check, because there won’t be anything to check.

1 Like

You were right. It was indeed the problem. I deleted it (Matches all alert instances) and now i receive alerts on slack.
Thank you very much