步骤一、服务端配置发件人邮箱信息
# docker exec -it -u root 312 /bin/bash
bash-5.0# vi /etc/grafana/grafana.ini
#################################### SMTP / Emailing ##########################
[smtp]
enabled = true #打开注释,改为true
host = smtp.qq.com:465 #百度查qq邮箱的smtp地址
user = 1440193775@qq.com #邮箱地址
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
password = atyholotnnuqjfbd #这里的密码是开启smtp以后的密码,不是邮箱密码
;cert_file =
;key_file =
skip_verify = true
from_address = 1440193775@qq.com
from_name = Grafana
# EHLO identity in SMTP dialog (defaults to instance_name)
;ehlo_identity = dashboard.example.com
bash-5.0# exit
exit
# docker stop `docker ps -a | grep grafana | awk '{print $1}'`
# docker start `docker ps -a | grep grafana | awk '{print $1}'`
步骤二、创建邮件发送规则
测试收到邮件!
步骤三、针对具体监控项,设置发送邮件阈值等
由于没安装image插件,所以无法显示图表
解决办法:grafana-cli plugins install grafana-image-renderer