opentsdb - Bosun 通知未触发
问题描述
Bosun 版本:Docker 0.6.0-pre
每当发生暴击或警告时,我都会尝试向我的网络服务器发送一个 http 请求。下面是我的配置
template test {
subject = {{.Last.Status}}: {{.Alert.Name}} on {{.Group.host}}
body = `<p>Name: {{.Alert.Name}}
<p>Tags:
<table>
{{range $k, $v := .Group}}
<tr><td>{{$k}}</td><td>{{$v}}</td></tr>
{{end}}
</table>`
}
notification testn {
# I can curl the below command successfully from Bosun docker container,
get = http://host.docker.internal:3000/openapi_bff/admin/bosun
}
alert cpu.is.too.high {
runEvery = 1
template = test
$metric = q("sum:rate{counter,,1}:os.cpu{host=*}", "1m", "")
$avgcpu = avg($metric)
warnNotification = testn
critNotification = testn
crit = $avgcpu > 0
warn = $avgcpu > 0
}
但是,该请求从未发送到我的服务器,并且我确实注意到弹出了一些奇怪的错误。
2021/08/08 17:03:43 info: notify.go:172: Batching and sending unknown notifications
2021/08/08 17:03:43 info: notify.go:202: Done sending unknown notifications
2021/08/08 17:03:44 error: interval.go:65: bosun.org/cmd/scollector/collectors.c_iostat_linux: cannot parse
在此先感谢您的帮助!
解决方案
推荐阅读
- powershell - 查询列以查看值是否存在
- arrays - 如何转换对象数组中的值
- sql - SQL Server 将本地日期时间转换为 UTC unix 时间戳
- sql - 在 SSIS 中将动态表传递给 ADO.NET 目标
- scheme - 尝试调用函数时方案未绑定
- c# - 如果我在 LAN 上和从外部通过 VPN 连接,是否需要 Web 服务来连接数据库?
- c - 在 C 中实现一个函数“装饰器”,它可以恢复原始函数的结果
- r - 显示(不同)具有相同轴的图数
- flutter - flutter docx_template NoSuchMethodError:在 null 上调用了 getter 'keys'
- javascript - 为什么我的 cookie 弹出按钮不起作用?