通过传入的Webhook连接具有缩放功能的Prometheus-alertmanager

时间:2019-06-26 13:50:56

标签: zoom webhooks prometheus-alertmanager

您好,我正尝试开始使用prometheus-alertmanager的webhooks向Zoom发送警报,但我一直收到错误消息

msg="Notify for alerts failed" num_alerts=1 err="cancelling notify retry for \"webhook\" due to unrecoverable error: unexpected status code 401

这是我的配置

global:
  resolve_timeout: 30m
route:
  receiver: 'zoom'
  routes:
    - match:
        severity: warning
      continue: true
      receiver: zoom
  group_by: ['resource']
  group_wait: 10s
  group_interval: 5m
  repeat_interval: 3h
receivers:
- name: 'zoom'
  webhook_configs:
  - url: 'https://inbots.zoom.us/incoming/hook/<SECRET>/'
    http_config:
      bearer_token: '<SECRET>'

有人尝试过将Alertmanager与ZOOM一起使用吗?

1 个答案:

答案 0 :(得分:0)

事实证明,警报管理器正在以一种不同于Zoom期望的方式格式化Authentication标头。因此,解决方案是在它们之间运行中间件。如果您不关心邮件在Zooms聊天中的外观,可以更改Headers格式的简单代理应该可以工作,但是如果您关心格式化邮件的格式,则需要一些更复杂的事情。