Grafana OSS SMTP Configuration

Hi,

I am facing issue while configuring Alert Notification via grafana to outlook, unfortunatly I don’t see any such related logs inside pods.

  • What Grafana version and what operating system are you using?

Chart version : grafana-9.3.0

  • What are you trying to achieve?

Trying to setup Alert Notification to Corporate outlook email

  • How are you trying to achieve it?

Tried configuring via grafana.ini,

  • What happened?

When we tried adding contact point in grafana UI, it says SMTP is not configured!

  • What did you expect to happen?

Alert Notification is expected to push events/alerts to EMAIL

  • Can you copy/paste the configuration(s) that you are having problems with?

grafana_ini:

smtp:

enabled: true

host: smtp.office365.com:587

user: $__env{SMTP_USER}

password: $__env{SMTP_PASSWORD}

# cert_file:

# key_file:

skip_verify: true

from_address: @<domain.com>

from_name: Grafana Alerts

# ehlo_identity:

# startTLS_policy:

# enable_tracing:

# existingSecret: “”

# userKey: “user”

# passwordKey: “password”

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

ERROR: Failed to send test alert.: SMTP not configured, check your grafana.ini config file’s [smtp] section

I do see SMTP section configured under grafana.ini file.

Could you please assist.

Thanks.

It looks like you are using helm for deployment. Indentation has meaning in the yaml file:

smtp:
  existingSecret: ""
  userKey: "user"
  passwordKey: "password"

vs:

smtp:
existingSecret: ""
userKey: "user"
passwordKey: "password"

Check the doc/default values for the used helm chart.

Of course you need to update deployed helm chart, when you change value file.