通过 incoming-webhook 连接 prometheus-alertmanager 和 zoom
Connecting prometheus-alertmanager with zoom via an incoming-webhook
您好,我正在尝试使用 prometheus-alertmanager 的 webhook 开始向 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 一起使用吗?
事实证明,警报管理器正在以一种不同于 Zoom 期望的方式格式化身份验证 header。所以解决办法就是运行在它们之间做一个中间件。如果您不关心消息在 Zooms 聊天中的外观,简单代理可以更改 Headers 格式,但如果您关心格式化消息,则需要更复杂的东西。
您好,我正在尝试使用 prometheus-alertmanager 的 webhook 开始向 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 一起使用吗?
事实证明,警报管理器正在以一种不同于 Zoom 期望的方式格式化身份验证 header。所以解决办法就是运行在它们之间做一个中间件。如果您不关心消息在 Zooms 聊天中的外观,简单代理可以更改 Headers 格式,但如果您关心格式化消息,则需要更复杂的东西。