【可用】prometheus邮件报警配置

参考:https://github.com/prometheus/alertmanager/issues/384
参考: https://github.com/easzlab/kubeasz/issues/448

使用QQ邮箱来发送,端口要使用587,465不行的
alertmanager配置:

/alertmanager $ cat /etc/alertmanager/alertmanager.yml 
global:
  resolve_timeout: 5m
  smtp_smarthost: 'smtp.qq.com:587'
  smtp_from: '5*******@qq.com'
  smtp_auth_username: '5*******@qq.com'
  smtp_auth_password: 'erievfvxwbvkiqio'

route:
  group_by: ['alertname']
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 1h
  receiver: 'wang'
receivers:
- name: 'wang'
  email_configs:
    - to: wanghaha@tech.io
      send_resolved: true
      require_tls: true
inhibit_rules:
  - source_match:
      severity: 'critical'
    target_match:
      severity: 'warning'
    equal: ['alertname', 'dev', 'instance']

邮件截图
在这里插入图片描述

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页