注册完成之后,通过企业微信官网登录后台管理,在【我的企业】的企业信息里面,获取到Alertmanager服务配置需用到的第一个配置:企业ID

部门ID
在【通讯录】中,添加一个子部门,用于接收告警信息,后面把人加到该部门,部门内的人就能接收到告警信息了。



告警AgentId和Secret的获取是需要在企业微信后台,在【应用管理】中,创建应用后才能够获得的。

填写相关消息,最后点击创建应用。

点击刚才创建好的应用Prometheus,就可以看到AgentId和Secret


通过以上步骤,我们就获取到配置Alertmanager的全部信息,包括:企业ID,接收告警的部门ID,AgentId和Secret,共四条消息
alertmanager:
enabled: true
config:
global:
wechat_api_url: ‘https://qyapi.weixin.qq.com/cgi-bin/’ # 企业微信的api_url,无需修改
wechat_api_corp_id: ‘xxxxxxxxxx’ # 企业微信中企业ID
wechat_api_secret: ‘xxxxxxxxxxxxx’ # 企业微信中,Prometheus应用的Secret
Error: INSTALLATION FAILED: failed parsing --set data: key "Firing) 0 -}}{{- range " has no value (cannot end with ,)
helm.go:84: [debug] key "Firing) 0 -}}{{- range " has no value (cannot end with ,)
helm.sh/helm/v3/pkg/strvals.(*parser).key
参考: