1、在grafana中添加smtp配置
ini
[smtp]
ehlo_identity = grafana.dxlreinb58fmxper.com
enabled = true
from_address = monitor@dxlreinb58fmxper.com
from_name = Grafana
host = smtp.sendgrid.net:587
password = "password"
skip_verify = false
user = apikey
2、配置alertmanager配置
yaml
global:
resolve_timeout: 5m
smtp_auth_password: SG.xxxxxxxx
smtp_auth_username: apikey
smtp_from: monitor@adsdfsefesdadfawefas.com
smtp_require_tls: true
smtp_smarthost: smtp.sendgrid.net:587
inhibit_rules:
.......
receivers:
- name: "null"
- email_configs:
- send_resolved: true
to: mailname@gmail.com
name: email
3、获取sendgrid passward的办法
1)自行注册一个sendgrid域名账号,按照操作一步一步到完成
要准备的东西
A、准备一个域名
B、要按提示添加域名的cname和txt记录
2)配置send_authentication,这个时候要自己定一个发件人,比如monitor@asfewfsd.com
3)创建一个apikey