基于XionZhao/prom-webhook-wechat改进,使用微信模板消息发送告警
Just type and run: make build
Generated in the binary file The ./build
Dir
usage: prom-webhook-wechat [<args>]
-web.listen-address ":8060"
Address to listen on for web interface.
-config.file "config.yaml"
Config file path
== WECHAT ==
-wechat.apiurl
Custom wechat api url
-wechat.timeout 5s
Timeout for invoking wechat webhook.
Do not add to note that there is behind the token of the capacity(The program will get token by corpid and corpsecret)
./prom-webhook-wechat -config.file=config.yaml -wechat.apiurl=api.weixin.qq.com
告警状态: {{ status.DATA }}
告警类型: {{ alertname.DATA }}
告警级别: {{ severity.DATA }}
告警实例: {{ instance.DATA }}
告警内容: {{ message.DATA }}
告警时间: {{ startsat.DATA }}
To view exmple/send_alert.sh
在 Webhook 地址栏中填写
http://{url}:8060/wechat/{groupname}/send
其中{groupname}为config.yaml中对应的chatgroups.name的名称