fix: alert ineffective on sunday
This commit is contained in:
parent
4063998ddb
commit
b947a466a9
|
@ -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) {
|
if !strings.Contains(alertRule.EnableDaysOfWeek, triggerWeek) {
|
||||||
logger.Debugf("event:%+v alert rule:%+v triggerWeek Noneffective", event, alertRule)
|
logger.Debugf("event:%+v alert rule:%+v triggerWeek Noneffective", event, alertRule)
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue