【问题标题】:Multiple email receivers in prometheus alertmanager "to" fieldprometheus alertmanager“to”字段中的多个电子邮件接收器
【发布时间】:2018-06-03 21:34:11
【问题描述】:

如何在“收件人”字段中创建具有多个电子邮件地址的收件人配置?

【问题讨论】:

    标签: email configuration monitoring prometheus


    【解决方案1】:

    您可以在to 字段中输入逗号分隔的电子邮件地址。

    to: 'user1@example.com, user2@example.com'

    【讨论】:

    • 我正在尝试这个,但它不起作用接收器:-名称:'team-one-mails' email_configs:-to:'bla1@bla.com','bla2@bla.com'来自:' prometheus@bla.com' require_tls: false send_resolved: true
    • @Shell_Leko 而不是:'bla1@bla.com'、'bla2@bla.com'。试试单引号中的逗号,所以'bla1@bla.com,bla2@bla.com'。这样,两封电子邮件将作为一个逗号分隔的字符串传递。
    • 这对我不起作用。唯一的工作是使用两个“to”配置。
    【解决方案2】:

    对于 prometheus 1.8,我在同一个接收器中使用了两个“to”配置。

    receivers:
    
      - name: 'bla1-and-bla2-mails'
        email_configs:
        - to: 'bla1@example.com' 
          from: 'prometheus@example.com'
          require_tls: false
          send_resolved: true
        - to: 'bla2@example.com'
          from: 'prometheus@example.com'
          require_tls: false
          send_resolved: true
    

    【讨论】:

      猜你喜欢
      • 2021-06-04
      • 1970-01-01
      • 2019-03-28
      • 1970-01-01
      • 1970-01-01
      • 2022-01-16
      • 1970-01-01
      • 2019-06-21
      • 2019-07-20
      相关资源
      最近更新 更多