Prometheus 如何使用web_钩子从promrtheus alertmanager向服务器发送POST Rest API

Prometheus 如何使用web_钩子从promrtheus alertmanager向服务器发送POST Rest API,prometheus,prometheus-alertmanager,Prometheus,Prometheus Alertmanager,我正在使用alertmanager的以下配置为prometheus发送API post调用,但不知何故我无法获得它,下面是我的配置 当我的flask服务器在端口9000的本地主机上运行时,它接受POST API调用 全球: http_config:'http://localhost:9000' 路线: 分组人:['alertname'] 分组等待:30秒 组间隔:10秒 重复间隔:10秒 接收器:测试api 路线: -接收器:测试api 分组等待:10秒 匹配: 基础设施:pse 接收人: -名

我正在使用alertmanager的以下配置为prometheus发送API post调用,但不知何故我无法获得它,下面是我的配置

当我的flask服务器在端口9000的本地主机上运行时,它接受POST API调用

全球: http_config:'http://localhost:9000' 路线: 分组人:['alertname'] 分组等待:30秒 组间隔:10秒 重复间隔:10秒 接收器:测试api 路线: -接收器:测试api 分组等待:10秒 匹配: 基础设施:pse 接收人: -名称:test_api webhook_配置: 发送解决方案:正确
url:“/test/test\u host”

这是一个无效的配置。请删除“全局”部分,然后尝试:

 receivers:
 - name: "test_api"  
   webhook_configs:
     send_resolved: true
     url: 'http://localhost:9000/test/test_host'