我想测试格拉瓦纳警报。我想在有警报时接收电子邮件。所以首先我在grafana.in i文件中设置了smtp:
#################################### 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 = admin@grafana.localhost
from_name = Grafana
[emails]
;welcome_email_on_sign_up = false
在Grafana的测试中,我设置了名称、类型:email、发送所有警报、包括图片。
我的电子邮件在Hotmail上。
当我按下发送测试时,我收到发送的测试通知,但没有收到电子邮件…
这是日志:
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=[myEmail@gmail.com]
t=2018-07-06T11:09:57+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[myEmail@gmail.com]
t=2018-07-06T11:10:26+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[myEmail@hotmail.com]
t=2018-07-06T11:10:27+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[myEmail@hotmail.com]
t=2018-07-06T11:12:31+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[myEmail@hotmail.com]
我也用Gmail做过测试,结果是一样的。