【问题标题】:Prometheus Alertmanager dc alert message onyl dc teamPrometheus Alertmanager dc 警报消息 onyl dc 团队
【发布时间】:2021-02-09 09:03:38
【问题描述】:

我在不同位置的设备通过 Prometheus 和 alertmanager 跟踪它们,当 Prometheus alertmanager 触发时,它会发送到所有团队。 当 Prometheus 产生警告时通知相关数据中心团队。在下面的示例中,我想做的是将波士顿数据中心发生的问题报告给波士顿团队,我该怎么做? 谢谢。

普罗米修斯config.yml:

    labels:
      dc: BOSTON
      name: BOS_APP_Server
      type: physical
  - targets:
    - 10.10.10.9:9100
    labels:
      dc: NEWY
      name: NEWY_APP_Server
      type: physical
  - targets:
    - 10.10.11.90:9100
    labels:
      dc: UTH
      name: UTH_FileServer
      type: physical
  - targets:
    - 10.10.12.99:9100` 
    

【问题讨论】:

    标签: prometheus prometheus-alertmanager


    【解决方案1】:

    您需要像这样配置 Alertmanager:

    route:
      # Default receiver
      receiver: 'report-team'
     
      routes:
        - receiver: 'boston-team'
          match_re:
            dc: BOSTON
     
        - receiver: 'newy-team'
          match_re:
            dc: NEWY
     
        - receiver: 'uth-team'
          match_re:
            dc: UTH
     
    receivers:
      - name: 'report-team'
        email_configs:
          - to: 'REPORT-TEAM-EMAIL@SERVER'
     
      - name: 'boston-team'
        email_configs:
          - to: 'BOSTON-TEAM-EMAIL@SERVER'
    
      - name: 'newy-team'
        email_configs:
          - to: 'NEWY-TEAM-EMAIL@SERVER'
    
      - name: 'uth-team'
        email_configs:
          - to: 'UTH-TEAM-EMAIL@SERVER'
    

    在 Alertmanager 配置here 中查看更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-02-28
      • 2022-07-13
      • 2021-12-11
      • 2016-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多