use NotifyRepeatNext as TriggerTime when repeat notify
This commit is contained in:
parent
95ebc44f05
commit
0f3bbf6368
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
NOW = $(shell date -u '+%Y%m%d%I%M%S')
|
NOW = $(shell date -u '+%Y%m%d%I%M%S')
|
||||||
|
|
||||||
RELEASE_VERSION = 5.0.0-ga-06
|
RELEASE_VERSION = 5.1.0
|
||||||
|
|
||||||
APP = n9e
|
APP = n9e
|
||||||
SERVER_BIN = $(APP)
|
SERVER_BIN = $(APP)
|
||||||
|
|
|
@ -79,7 +79,7 @@ services:
|
||||||
- "server"
|
- "server"
|
||||||
|
|
||||||
nwebapi:
|
nwebapi:
|
||||||
image: ulric2019/nightingale:5.0.0-ga-06
|
image: ulric2019/nightingale:5.1.0
|
||||||
container_name: nwebapi
|
container_name: nwebapi
|
||||||
hostname: nwebapi
|
hostname: nwebapi
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -107,7 +107,7 @@ services:
|
||||||
- "webapi"
|
- "webapi"
|
||||||
|
|
||||||
nserver:
|
nserver:
|
||||||
image: ulric2019/nightingale:5.0.0-ga-06
|
image: ulric2019/nightingale:5.1.0
|
||||||
container_name: nserver
|
container_name: nserver
|
||||||
hostname: nserver
|
hostname: nserver
|
||||||
restart: always
|
restart: always
|
||||||
|
|
|
@ -48,6 +48,14 @@ func repeat() {
|
||||||
|
|
||||||
event.DB2Mem()
|
event.DB2Mem()
|
||||||
|
|
||||||
|
// 重复通知的告警,应该用新的时间来判断是否生效和是否屏蔽,
|
||||||
|
// 不能使用TriggerTime,因为TriggerTime是触发时的时间,
|
||||||
|
// 先发了告警,又做了屏蔽,本质是不想发了,如果继续用TriggerTime判断
|
||||||
|
// 就还是会发,不符合预期,所以,这里伪装一下TriggerTime,
|
||||||
|
// 判断完了再卸掉伪装
|
||||||
|
realTriggerTime := event.TriggerTime
|
||||||
|
event.TriggerTime = event.NotifyRepeatNext
|
||||||
|
|
||||||
if isNoneffective(event.TriggerTime, rule) {
|
if isNoneffective(event.TriggerTime, rule) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -56,6 +64,8 @@ func repeat() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
event.TriggerTime = realTriggerTime
|
||||||
|
|
||||||
fillUsers(event)
|
fillUsers(event)
|
||||||
notify(event)
|
notify(event)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue