git clone https:/hanlei153/Alertmanager-repeater.git
cd Alertmanager-repeater/config
vim config.ini
#0表示关闭告警,1表示开启告警,bot_url设置为机器人的webhook的地址
feishu = 0
bot_url = https:xxxx...
cd Alertmanager-repeater
pip3 install gunicorn && pip3 install -r requirements.txt
cd Alertmanager-repeater/bin
gunicorn Alertmanager-repeater:server -w 6 -b 0.0.0.0:$SERVER_PORT
cd Alertmanager-repeater
docker build -t image:tag .
docker run -it --name container_name -v ./config:/opt/Alertmanager-repeater/config -p port:port image:tag
docker restart container_name
"receivers":
- "name": "prometheus-feishu-webhook"
"webhook_configs":
- "url": "http://IP:port/api/feishu" #飞书告警地址
- "url": "http://IP:port/api/dingding" #钉钉告警地址
http://IP:port/api/health #返回值为{'status': 'OK'}