xmlParser
xmlParser

Reputation: 2021

Grafana alerts test notification sent but no email has been received

I wanted to test Grafana alerts. I want to receive email when there is an alert. So first I have setup the SMTP in grafana.ini file:

#################################### SMTP / Emailing##########################
[smtp]
enabled = true
host = localhost:25 
user = 
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
password = 
;cert_file =
;key_file =
skip_verify = true
from_address = [email protected]
from_name = Grafana

[emails]
;welcome_email_on_sign_up = false

In the test in the Grafana, I have set name, type:Email, send on all alerts, include image. My email is on hotmail.

When i press send test, I receive Test notification sent, but there is no email received...

Here is the log:

t=2018-07-06T11:09:54+0000 lvl=eror msg="can't read datasource provisioning files from directory" logger=provisioning.datasources path=/etc/grafana/provisioning/datasources
t=2018-07-06T11:09:54+0000 lvl=info msg="Initializing RenderingService" logger=server
t=2018-07-06T11:09:54+0000 lvl=info msg="Initializing TracingService" logger=server
t=2018-07-06T11:09:54+0000 lvl=info msg="Initializing Stream Manager"
t=2018-07-06T11:09:54+0000 lvl=info msg="HTTP Server Listen" logger=http.server address=0.0.0.0:3000 protocol=http subUrl= socket=
t=2018-07-06T11:09:54+0000 lvl=eror msg="can't read dashboard provisioning files from directory" logger=provisioning.dashboard path=/etc/grafana/provisioning/dashboards
t=2018-07-06T11:09:57+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[[email protected]]
t=2018-07-06T11:09:57+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[[email protected]]
t=2018-07-06T11:10:26+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[[email protected]]
t=2018-07-06T11:10:27+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[[email protected]]
t=2018-07-06T11:12:31+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[[email protected]]

I have tested with gmail too, and it is same.

Upvotes: 1

Views: 5783

Answers (1)

AussieDan
AussieDan

Reputation: 2176

Do you have an SMTP server listening on localhost port 25? If not, you'll either need to run one or use a valid SMTP config for Grafana. If you are, you need to check the mail server logs to see what it's doing with the emails.

Upvotes: 1

Related Questions