fix: alert ineffective on sunday

This commit is contained in:
710leo 2021-07-25 18:19:18 +08:00
parent 4063998ddb
commit b947a466a9
1 changed files with 2 additions and 0 deletions

View File

@ -258,6 +258,8 @@ func isNoneffective(event *models.AlertEvent, alertRule *models.AlertRule) bool
}
}
alertRule.EnableDaysOfWeek = strings.Replace(alertRule.EnableDaysOfWeek, "7", "0", 1)
if !strings.Contains(alertRule.EnableDaysOfWeek, triggerWeek) {
logger.Debugf("event:%+v alert rule:%+v triggerWeek Noneffective", event, alertRule)
return true