Prometheus MS Teams issue

196 views
Skip to first unread message

Endre Gyalus

unread,
Aug 16, 2023, 3:30:11 AM8/16/23
to Prometheus Users
Hello , 
I installed prometheus-community/kube-prometheus-stack
and also MS-Teams Prometheus proxy but I cannot make it work. I dont see anything in logs. I dont understand because the webhook works in my Grafana for example and they are all in the same namespace. 

values.yaml for the kube-prometheus-stack: 

    route:
      group_by: ['namespace']
      group_wait: 30s
      group_interval: 5m
      repeat_interval: 5mh
      receiver: 'prometheus-msteams'
      routes:
      - receiver: 'prometheus-msteams'
        matchers:
          - alertname =~ "InfoInhibitor|Watchdog"
    receivers:
    - name: 'prometheus-msteams'
      webhook_configs:
    - send_resolved: true
      url: 'http://prometheus-msteams:2000/alert'


For ms-teams values.yaml:

The service also there : 
kubectl get svc -n infra-monitoring
prometheus-msteams                               ClusterIP   10.233.45.246   <none>        2000/TCP                     100m

Any idea ? I really dont get it. 







Brian Candler

unread,
Aug 16, 2023, 3:42:19 AM8/16/23
to Prometheus Users
    receivers:
    - name: 'prometheus-msteams'
      webhook_configs:
    - send_resolved: true
      url: 'http://prometheus-msteams:2000/alert'

That looks like broken YAML formatting (and I'm surprised it's accepted at all: it looks like two receivers, one with a name and empty webhook_configs, and one with send_resolved and url, which aren't valid at the top level of a receiver).

You want:

    receivers:
    - name: 'prometheus-msteams'
      webhook_configs:
    - send_resolved: true
      url: 'http://prometheus-msteams:2000/alert'

Apart from that: you can crank up the debug level on alertmanager, and you'll definitely get *something* logged when it tries to deliver an alert (whether successfully or unsuccessfully). Then you can see whether the problem is prometheus->alertmanager or alertmanager->msteams-proxy or msteams-proxy->Microsoft
Reply all
Reply to author
Forward
0 new messages