提交 c6356df8 编写于 作者: U Ulric Qin

+NotifyBuiltinEnable

上级 085bd396
......@@ -66,6 +66,8 @@ Batch = 5
[Alerting]
TemplatesDir = "./etc/template"
NotifyConcurrency = 10
# use builtin go code notify by default
NotifyBuiltinEnable = true
[Alerting.CallScript]
# built in sending capability in go code
......
......@@ -135,11 +135,12 @@ type SMTPConfig struct {
}
type Alerting struct {
TemplatesDir string
NotifyConcurrency int
CallScript CallScript
RedisPub RedisPub
Webhook Webhook
TemplatesDir string
NotifyConcurrency int
NotifyBuiltinEnable bool
CallScript CallScript
RedisPub RedisPub
Webhook Webhook
}
type CallScript struct {
......
......@@ -119,6 +119,10 @@ func alertingRedisPub(bs []byte) {
func handleNotice(notice Notice, bs []byte) {
alertingCallScript(bs)
if !config.C.Alerting.NotifyBuiltinEnable {
return
}
emailset := make(map[string]struct{})
phoneset := make(map[string]struct{})
wecomset := make(map[string]struct{})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册