環境查看
查看granfana版本
也可以使用以下方法查看版本
grafana-server -v
設置郵件發送者信息
報警granfana配置文件添加郵件配置信息
/etc/grafana/grafana.ini
[smtp] #開啟smtp enabled = true #郵箱發送地址及端口 host = smtp.exmail.qq.com:25 #郵箱用戶名 user = xxx@xxx.xx # If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""" #郵箱密碼 password = xxxx ;cert_file = ;key_file = ;skip_verify = false from_address = xx@xxx.xx from_name = xx # EHLO identity in SMTP dialog (defaults to instance_name) ;ehlo_identity = dashboard.example.com # SMTP startTLS policy (defaults to 'OpportunisticStartTLS') ;startTLS_policy = NoStartTLS
重啟granfana服務器
systemctl restart grafana-server
granfana添加告警
設置好的郵箱會收到測試郵件
針對具體監控項配置告警
當觸發告警則發送郵件