PrometheusAlert icon indicating copy to clipboard operation
PrometheusAlert copied to clipboard

飞书机器人应用告警发不出

Open chinaboy007 opened this issue 2 years ago • 1 comments

参考https://github.com/feiyu563/PrometheusAlert/blob/master/doc/readme/conf-feishuapp.md 配置飞书机器人告警

PrometheusAlert配置如下: #---------------------↓飞书机器人应用----------------------- #是否开启feishuapp告警通道,可同时开始多个通道0为关闭,1为开启 open-feishuapp=1 # APPID FEISHU_APPID=cli_a5afa8d8e4f9XXXX # APPSECRET FEISHU_APPSECRET=tPBfXRXgSn5VdIXkwij9abqGLvEXXXX # 可填飞书 用户open_id、user_id、union_ids、部门open_department_id AT_USER_ID="65bde749ead63d39,ou_d71c207c568b2326724454228a4XXXX" ##前面是部门ID,后面是user_id

Alert-manager配置如下:

  • name: 'web.hook.prometheusalert' webhook_configs:
    • url: 'http://prometheus-alert-center:8080/prometheusalert?type=fsapp&tpl=prometheus-feishu-app&at=ou_d71c207c568b2326724454228a4cXXX'

告警机器人无法收到告警,是哪里配置有问题吗?

chinaboy007 avatar Oct 11 '23 05:10 chinaboy007

手动测试,提示参数错误

curl -v 'http://10.244.77.1:8080/prometheusalert?type=fsapp&tpl=prometheus-feishu-app&at=ou_d71c207c568b2326724454228a4ca6da'

  • About to connect() to 10.244.77.1 port 8080 (#0)
  • Trying 10.244.77.1...
  • Connected to 10.244.77.1 (10.244.77.1) port 8080 (#0)

GET /prometheusalert?type=fsapp&tpl=prometheus-feishu-app&at=ou_d71c207c568b2326724454228a4ca6da HTTP/1.1 User-Agent: curl/7.29.0 Host: 10.244.77.1:8080 Accept: /

< HTTP/1.1 200 OK < Content-Length: 14 < Content-Type: application/json; charset=utf-8 < Server: beegoServer:1.12.1 < Date: Wed, 11 Oct 2023 08:03:59 GMT <

  • Connection #0 to host 10.244.77.1 left intact "参数错误"

chinaboy007 avatar Oct 11 '23 08:10 chinaboy007