From 22f221937e8da269294dbcaf3ba7c6d9d0f0d572 Mon Sep 17 00:00:00 2001 From: kongfei Date: Sat, 5 Nov 2022 19:38:09 +0800 Subject: [PATCH] v5.14.1 --- Chart.yaml | 4 ++-- templates/nserver/conf-cm.yaml | 3 +++ templates/nwebapi/conf-cm.yaml | 30 ++++++++++++++++++++++++++++++ tpl/wecom.tpl | 8 +++++--- values.yaml | 4 ++-- 5 files changed, 42 insertions(+), 7 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index f723784..a134b28 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -27,7 +27,7 @@ sources: maintainers: - email: contact-us@flashcat.cloud name: flashcatcloud -version: 0.1.5 +version: 0.1.6 apiVersion: v1 -appVersion: 5.14.0 +appVersion: 5.14.1 icon: https://raw.githubusercontent.com/flashcatcloud/n9e-helm/master/n9e-icon.png diff --git a/templates/nserver/conf-cm.yaml b/templates/nserver/conf-cm.yaml index f5fea34..080a731 100644 --- a/templates/nserver/conf-cm.yaml +++ b/templates/nserver/conf-cm.yaml @@ -28,6 +28,8 @@ data: BusiGroupLabelKey = "busigroup" EngineDelay = 60 DisableUsageReport = false + ReaderFrom = "config" + ForceUseServerTS = true [Log] Dir = "logs" Level = "INFO" @@ -56,6 +58,7 @@ data: InsecureSkipVerify = true Batch = 5 [Alerting] + Timeout=30000 TemplatesDir = "/app/etc/template" NotifyConcurrency = 10 NotifyBuiltinChannels = ["email", "dingtalk", "wecom", "feishu", "mm"] diff --git a/templates/nwebapi/conf-cm.yaml b/templates/nwebapi/conf-cm.yaml index 4b5f2ac..690567e 100644 --- a/templates/nwebapi/conf-cm.yaml +++ b/templates/nwebapi/conf-cm.yaml @@ -114,6 +114,36 @@ data: Nickname = "nickname" Phone = "phone_number" Email = "email" + [CAS] + Enable = false + DiaplayName = "CAS登录" + SsoAddr = "https://cas.example.com/cas/" + RedirectURL = "http://127.0.0.1:18000/callback/cas" + CoverAttributes = false + DefaultRoles = ["Standard"] + [CAS.Attributes] + Nickname = "nickname" + Phone = "phone_number" + Email = "email" + [OAuth] + Enable = false + DisplayName = "OAuth2登录" + RedirectURL = "http://127.0.0.1:18000/callback/oauth" + SsoAddr = "https://sso.example.com/oauth2/authorize" + TokenAddr = "https://sso.example.com/oauth2/token" + UserInfoAddr = "https://api.example.com/api/v1/user/info" + ClientId = "" + ClientSecret = "" + CoverAttributes = true + DefaultRoles = ["Standard"] + UserinfoIsArray = false + UserinfoPrefix = "data" + Scopes = ["profile", "email", "phone"] + [OAuth.Attributes] + Username = "username" + Nickname = "nickname" + Phone = "phone_number" + Email = "email" [Redis] Address = "{{ template "nightingale.redis.addr" . }}" Password = "{{ template "nightingale.redis.password" . }}" diff --git a/tpl/wecom.tpl b/tpl/wecom.tpl index 5a16cd6..5a90151 100644 --- a/tpl/wecom.tpl +++ b/tpl/wecom.tpl @@ -1,7 +1,9 @@ **级别状态**: {{if .IsRecovered}}S{{.Severity}} Recovered{{else}}S{{.Severity}} Triggered{{end}} **规则标题**: {{.RuleName}}{{if .RuleNote}} -**规则备注**: {{.RuleNote}}{{end}} -**监控指标**: {{.TagsJSON}} -{{if .IsRecovered}}**恢复时间**:{{timeformat .LastEvalTime}}{{else}}**触发时间**: {{timeformat .TriggerTime}} +**规则备注**: {{.RuleNote}}{{end}}{{if .TargetIdent}} +**监控对象**: {{.TargetIdent}}{{end}} +**监控指标**: {{.TagsJSON}}{{if not .IsRecovered}} **触发时值**: {{.TriggerValue}}{{end}} +{{if .IsRecovered}}**恢复时间**: {{timeformat .LastEvalTime}}{{else}}**首次触发时间**: {{timeformat .FirstTriggerTime}}{{end}} +{{$time_duration := sub now.Unix .FirstTriggerTime }}{{if .IsRecovered}}{{$time_duration = sub .LastEvalTime .FirstTriggerTime }}{{end}}**持续时长**: {{humanizeDurationInterface $time_duration}} **发送时间**: {{timestamp}} \ No newline at end of file diff --git a/values.yaml b/values.yaml index 4edd206..c4a0bcc 100644 --- a/values.yaml +++ b/values.yaml @@ -216,7 +216,7 @@ nwebapi: automountServiceAccountToken: false image: repository: flashcatcloud/nightingale - tag: 5.14.0 + tag: 5.14.1 nodeSelector: {} tolerations: [] affinity: {} @@ -234,7 +234,7 @@ nserver: automountServiceAccountToken: false image: repository: flashcatcloud/nightingale - tag: 5.14.0 + tag: 5.14.1 nodeSelector: {} tolerations: [] affinity: {}