【问题标题】:Set MicrosoftTeams notification on Prometheus Alertmanager在 Prometheus Alertmanager 上设置 MicrosoftTeams 通知
【发布时间】:2019-06-05 10:08:19
【问题描述】:

我尝试为 Prometheus Alertmanager 设置 Microsoft Teams 通知,但未收到通知。

alertmanager.yaml 文件为:

global:
resolve_timeout: 5m
  http_config: {}
  smtp_hello: localhost
  smtp_require_tls: true
  pagerduty_url: https://events.pagerduty.com/v2/enqueue
  hipchat_api_url: https://api.hipchat.com/
  opsgenie_api_url: https://api.opsgenie.com/
  wechat_api_url: https://qyapi.weixin.qq.com/cgi-bin/
  victorops_api_url: https://alert.victorops.com/integrations/generic/20131114/alert/
route:
  receiver: teams
  group_by:
  - alertname
  routes:
  - receiver: teams
    match:
      alertname: QuotaCPUSolrExcedeed
receivers:
- name: teams
  webhook_configs:
  - send_resolved: true
    http_config: {}
    url: https://outlook.office.com/webhook/xxx
templates: []

“QuotaCPUSolrExcedeed”规则存在并且适用于 Prometheus。

如果我将 webhook_url 放在 Grafana 上,通知就会到达,但如果我使用 alertmanager,则不会!

你知道问题可能是什么吗?

【问题讨论】:

标签: kubernetes grafana prometheus microsoft-teams prometheus-alertmanager


【解决方案1】:

Prometheus AlertManager 网络挂钩是 generic one。为了将消息转换为 MS 团队接受的格式,您需要使用边车。选项prom2teams之一,官方doc有描述。

【讨论】:

  • 谢谢!最后我为电子邮件使用了 smtp 设置
猜你喜欢
  • 2022-01-06
  • 1970-01-01
  • 2021-07-13
  • 2021-11-25
  • 2018-06-01
  • 2020-10-21
  • 1970-01-01
  • 1970-01-01
  • 2021-06-04
相关资源
最近更新 更多