陈永仁27149

Results 2 comments of 陈永仁27149

> 可以尝试把邮件告警功能开启,看看是否能正常收到告警邮件。而且当你不配置wechat自定义模板时,alertmanager会使用默认模板,可以看看这时能否收到消息。如果这样是正常的,应该就是自定义模板的问题了,可以参考 _https://godoc.org/text/template_ 中的语法说明自己调试下。 多谢指点!注释掉模板配置,的确是可以的。 ![image](https://user-images.githubusercontent.com/47019171/61424152-2465ce00-a945-11e9-8975-70e267f91931.png) 试了一下这里的模板,有语法错误: level=error ts=2019-07-18T02:11:59.582Z caller=notify.go:367 component=dispatcher msg="Error on notify" err="cancelling notify retry for \"wechat\" due to unrecoverable error: templating error: template: wechat.tmpl:2:11: executing \"wechat.tmpl\" at...

> ``` > executing "wechat.tmpl" at : error calling len: len of untyped nil" > ``` > > 报错这里其实是要判断一下是否有告警或恢复信息,好为后边的迭代做预判断。我当时调试通过的软件版本如下: > > * prometheus: 2.4.3 > * alertmanager: 0.15.2 > >...