Bosun 无法向使用以下日志配置的邮件发送警报通知。
错误:notify.go:111:未能将警报 high.cpu{host= } 发送到 [* @gmail.com] EOF
这是我的 bosun.conf
tsdbHost = localhost:4242
stateFile = /data/bosun.state
ledisBindAddr = 0.0.0.0:9565
smtpHost = smtp.gmail.com:465
emailFrom = bosun-alert@noreply.com
notification email {
email = ***@gmail.com
next = email
timeout = 5s
print = true
}
template test {
subject = {{.Last.Status}}: {{.Alert.Name}} on {{.Group.host}}
body = `<p>Alert: {{.Alert.Name}} triggered on {{.Group.host}}
<hr>
<p><strong>Computation</strong>
<table>
{{range .Computations}}
<tr><td><a href="{{$.Expr .Text}}">{{.Text}}</a></td><td>{{.Value}}</td></tr>
{{end}}
</table>
<hr>
{{ .Graph .Alert.Vars.metric }}
<hr>
<p><strong>Relevant Tags</strong>
<table>
{{range $k, $v := .Group}}
<tr><td>{{$k}}</td><td>{{$v}}</td></tr>
{{end}}
</table>`
}
alert high.cpu {
template = test
$metric = q("sum:rate{counter,,1}:os.cpu{host=*}", "1h", "")
$avgcpu = avg($metric)
crit = $avgcpu > 3
warn = $avgcpu > 2
critNotification = email
warnNotification = email
}
请帮我弄清楚我做错了什么。