Troubleshooting provisionned alerts

Hi people !
I’m starting with Grafana and trying to figure out why emails are not sent.
From debug logs, it seems there’s something missing, but I cannot figure out what it is.

  • What Grafana version and what operating system are you using?
    Grafana version 10.2.2 on Alpine Linux 3.19.1

  • What are you trying to achieve?
    Getting emails alerts

  • How are you trying to achieve it?
    Testing from my Grafana host :

apk add mailx
export SMTPHOST=mail.mysmtp.tld && echo -e "Subject: Grafana\nThis is a test!\n" | sendmail -t -v root@mysmtp.tld

My SMTP received this test without problem.

I clicked on : Send alerts to “Both internal and external”

Checked in Notification policies, there is :
Default policy
All alert instances will be handled by the default policy if no other matching policies are found.

  • What happened?
    My alert is displayed as “1 firing”, but emails are never sent

  • What did you expect to happen?
    Emails to be sent

  • Can you copy/paste the configuration(s) that you are having problems with?
    /etc/grafana.ini
    [smtp]
    enabled = true
    host = mysmtp.tld:25
    [log]
    level = debug

Default notification policy :

{
  "template_files": {},
  "template_file_provenances": {},
  "alertmanager_config": {
    "route": {
      "receiver": "grafana-default-email",
      "group_by": [
        "grafana_folder",
        "alertname"
      ],
      "repeat_interval": "1m"
    },
    "templates": null,
    "receivers": [
      {
        "name": "grafana-default-email",
        "grafana_managed_receiver_configs": [
          {
            "uid": "bf276d05-362c-4d47-af8d-724d93045d5e",
            "name": "grafana-default-email",
            "type": "email",
            "disableResolveMessage": false,
            "settings": {
              "addresses": "<root@mysmtp.tld>",
              "singleEmail": false
            },
            "secureFields": {}
          }
        ]
      }
    ]
  }
}
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

Checked that debug logs, I’m trying to understand what is missing actually, and how to add it ?

Mar 11 11:38:27 GRAPH local7.debug /usr/bin/grafana[538]: logger=ngalert.multiorg.alertmanager t=2024-03-11T11:38:27.689703919+01:00 level=debug msg="Synchronizing Alertmanagers for orgs"
Mar 11 11:38:27 GRAPH local7.debug /usr/bin/grafana[538]: logger=ngalert.notifier.alertmanager 1=(MISSING) t=2024-03-11T11:38:27.695189134+01:00 level=debug msg="Neither config nor template have changed, skipping configuration sync."

Thanks for any help !

Finally I’ve found a solution.
My alerts were generated from Prometheus and set as “Mimir / Cortex / Loki”.
As soon as I recreated them as Grafana alerts, I started getting e-mails.