1、grafana-server 配置 smtp 服務器
// grafana 版本信息:grafana-6.2.1.linux-amd64.tar.gz
# vim /usr/local/grafana-6.2.1/conf/defaults.ini
[smtp]
# 啟用 smtp
enabled = true
# 郵件服務器地址和端口
host = smtp.sina.com:587
# 賬號
user = foobar@sina.com
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
# 密碼
password = 123456
cert_file =
key_file =
# 忽略 SSL 認證
skip_verify = true
from_address = foobar@sina.com
from_name = Grafana
ehlo_identity =
# systemctl restart grafana-server
2、配置郵件通知方式
保存并發送測試郵件,配置完成
3、Linux 內存告警配置
問題:Template variables are not supported in alert queries
解決辦法:單獨配置個告警的視圖,用正則匹配出所有的主機 或者 每臺主機單獨一個查詢語句
完成狀態
測試內存告警的郵件