From 1f4e8e752e64a814c4092aa0fb671b5601ac7e03 Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Tue, 1 Mar 2022 17:04:10 +0800 Subject: [PATCH] update docker-compose configs --- docker/n9eetc/server.conf | 31 +++++++++++++++++++++++++++++-- docker/n9eetc/webapi.conf | 26 ++++++++++++++++++++++++-- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/docker/n9eetc/server.conf b/docker/n9eetc/server.conf index a0116f77..921ad218 100644 --- a/docker/n9eetc/server.conf +++ b/docker/n9eetc/server.conf @@ -4,6 +4,9 @@ RunMode = "release" # my cluster name ClusterName = "Default" +# sleep x seconds, then start judge engine +EngineDelay = 120 + [Log] # log write dir Dir = "logs" @@ -51,16 +54,40 @@ IP = "" # unit ms Interval = 1000 +[SMTP] +Host = "smtp.163.com" +Port = 994 +User = "username" +Pass = "password" +From = "username@163.com" +InsecureSkipVerify = true +Batch = 5 + [Alerting] -NotifyScriptPath = "./etc/script/notify.py" -NotifyConcurrency = 100 TemplatesDir = "./etc/template" +NotifyConcurrency = 10 +# use builtin go code notify by default +NotifyBuiltinEnable = true + +[Alerting.CallScript] +# built in sending capability in go code +# so, no need enable script sender +Enable = false +ScriptPath = "./etc/script/notify.py" [Alerting.RedisPub] Enable = false # complete redis key: ${ChannelPrefix} + ${Cluster} ChannelPrefix = "/alerts/" +[Alerting.Webhook] +Enable = false +Url = "http://a.com/n9e/callback" +BasicAuthUser = "" +BasicAuthPass = "" +Timeout = "5s" +Headers = ["Content-Type", "application/json", "X-From", "N9E"] + [NoData] Metric = "target_up" # unit: second diff --git a/docker/n9eetc/webapi.conf b/docker/n9eetc/webapi.conf index f3a3d3a1..0e69111b 100644 --- a/docker/n9eetc/webapi.conf +++ b/docker/n9eetc/webapi.conf @@ -10,19 +10,39 @@ AdminRole = "Admin" # metrics descriptions MetricsYamlFile = "./etc/metrics.yaml" -# Linkage with notify.py script -NotifyChannels = [ "email", "dingtalk", "wecom", "feishu" ] +[[NotifyChannels]] +Label = "邮箱" +# do not change Key +Key = "email" + +[[NotifyChannels]] +Label = "钉钉机器人" +# do not change Key +Key = "dingtalk" + +[[NotifyChannels]] +Label = "企微机器人" +# do not change Key +Key = "wecom" + +[[NotifyChannels]] +Label = "飞书机器人" +# do not change Key +Key = "feishu" [[ContactKeys]] Label = "Wecom Robot Token" +# do not change Key Key = "wecom_robot_token" [[ContactKeys]] Label = "Dingtalk Robot Token" +# do not change Key Key = "dingtalk_robot_token" [[ContactKeys]] Label = "Feishu Robot Token" +# do not change Key Key = "feishu_robot_token" [Log] @@ -93,6 +113,8 @@ AuthFilter = "(&(uid=%s))" CoverAttributes = true TLS = false StartTLS = true +# ldap user default roles +DefaultRoles = ["Standard"] [LDAP.Attributes] Nickname = "cn"