Skip to content

AlertManger 中如何配置邮件告警通知? #6

Description

@songjiayang

如何配置 AlertManger smtp 配置?

环境

  • Alertmanager 版本: 0.13.0

QA

以 gmail 为例, Alertmanger 提供的 smtp 选项进行配置信息如下:

global:
  smtp_smarthost: 'smtp.gmail.com:587'
  smtp_from: 'xx@gmail.com'
  smtp_hello: 'gmail.com'

templates: 
- './template/*.tmpl'  #自定义模版需要配置此参数, 默认的模版已经编译到二进制包中了。

receivers:
- name: 'email'
  email_configs:
  - to: 'xx@gmail.com'
    auth_username: 'xx@gmail.com'
    auth_identity: 'xx@gmail.com'
    auth_password: 'x'

注意:

  1. 其中 auth_password 应该为 gmail app password
  2. 尽量避免使用非专业的邮箱发送服务进行告警通知,例如 QQ 邮箱。

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions