安装好prometheus和alertmanager后,可在prometheus.yml文件里添加告警策略文件。

1、在rule_files,加载/usr/local/prometheus/rules.yml文件。

真强大!prometheus配置企业微信告警

2、在rule.yml配置告警策略

真强大!prometheus配置企业微信告警

3、在alertmanager.yml配置告警对象,配置为企业微信:

wechat_api_corp_id:从微信公众号的企业微信获取,在企业微信,企业应用-》基础应用-》创建第三方应用,可查看到应用ID。

wechat_api_url: https://qyapi.weixin.qq.com/cgi-bin/

wechat_api_secret:企业微信ID

真强大!prometheus配置企业微信告警

真强大!prometheus配置企业微信告警

4、告警效果:

真强大!prometheus配置企业微信告警

相关文章:

  • 2022-03-05
  • 2021-06-10
  • 2021-04-01
  • 2021-08-09
  • 2021-11-21
  • 2021-07-01
  • 2022-02-21
猜你喜欢
  • 2022-01-14
  • 2021-07-08
  • 2021-11-04
  • 2022-12-23
  • 2021-12-15
  • 2021-04-02
相关资源
相似解决方案