简体   繁体   中英

Set MicrosoftTeams notification on Prometheus Alertmanager

I try to set Microsoft Teams notifications for Prometheus Alertmanager, but the notification doesn't arrive.

The alertmanager.yaml file is:

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: []

The rule 'QuotaCPUSolrExcedeed' exist and work on Prometheus.

If I put the webhook_url on Grafana, the notification arrives, but if I use alertmanager, no!

Do you have any idea what the problem might be?

Prometheus AlertManager web hook is a generic one . In order to transform the message into format, which is accepted by MS teams, you need to use side car. One of the option prom2teams , as it is described in the official doc .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM