🐛 fix(alert): 跳过未启用规则

This commit is contained in:
naiba 2020-12-21 23:56:08 +08:00
parent 87ecccd58c
commit 9cb7cf5958

View File

@ -114,6 +114,10 @@ func checkStatus() {
defer dao.ServerLock.RUnlock()
for j := 0; j < len(alerts); j++ {
// 跳过未启用
if alerts[j].Enable == nil || !*alerts[j].Enable {
continue
}
for _, server := range dao.ServerList {
// 监测点
alertsStore[alerts[j].ID][server.ID] = append(alertsStore[alerts[j].