修改grafana的配置文件
grafana的配置文件默认是在 /etc/grafana/grafana.ini
修改如下:
[smtp]
enabled = true #是否允许开启
host = smtp.exmail.qq.com:465 #发送服务器地址
password = 你的密码
;cert_file =
;key_file =
;skip_verify = false
from_address = 你的邮箱
from_name = Grafana
ehlo_identity = dashboard.example.com
[emails]
;welcome_email_on_sign_up = true
重新启动grafana服务,配置文件生效
service grafana-server restart
问题:
在日志打印有
error=“SMTP not configured, check your grafana.ini config file’s [smtp] section.”
这是因为在ini文件中行开头的分号表示它已被注释,所以去掉分号。问题解决。
去掉分号重启完毕后就可以到页面去进行测试。
测试
Grafana告警配置邮件发送功能
点击发送,查看邮件是否测试成功了。

相关文章:

  • 2022-12-23
  • 2021-12-28
  • 2022-01-09
  • 2021-07-03
  • 2021-12-01
  • 2022-12-23
  • 2021-11-20
猜你喜欢
  • 2021-11-17
  • 2021-07-06
  • 2021-08-26
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2021-11-28
相关资源
相似解决方案