>[info]Grafana仪表盘模板:[下载](./Grafana模板.zip) 官方模板:[https://grafana.com/grafana/dashboards](https://grafana.com/grafana/dashboards) [TOC] ## 一、邮件配置 修改`grafana`文件`/etc/grafana/grafana.ini`配置smtp服务器 ~~~ [smtp] enabled = true host = smtp.163.com:465 #smtp服务器的地址:端口 (服务器地址不同公司可能不相同) user = 你的邮箱 # If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;""" password = 邮箱客户端授权密码 ;cert_file = ;key_file = skip_verify = true #Verify SSL for smtp server? defaults to false from_address = 你的邮箱 from_name = Grafana ~~~ ## 二、配置邮件通知 ![](https://img.kancloud.cn/c1/9f/c19f25d10e441a1a7b040cdb4674974c_379x266.png) ![](https://img.kancloud.cn/19/78/1978c8cba89f6727939143bfe4032fc9_780x582.png) ## 三、Alert配置 ![](https://img.kancloud.cn/f9/a8/f9a830547f54c0e63875983de79ed212_1678x772.png) ![](https://img.kancloud.cn/3f/65/3f65d30b042c34e8a1c584085e2a3751_1200x503.png) ![](https://img.kancloud.cn/89/92/899244422718878d2a4b7cf39020f989_713x309.png) ## 四、注意事项 ![](https://img.kancloud.cn/95/5f/955f2ea0176927dcaf701a7e6228087a_1200x611.png) 1. 只有`Graph`图表能配置`Alert` 2. 使用了模板变量的查询不能配置告警 >[info] 解决办法:单独配置个告警的视图,用正则匹配出所有的主机 或者 每台主机单独一个查询语句