Continue checking all monitors after sending alert
Previously this was mistakenly returning after sending an alert. Now all alerts will be sent unless there is an exception on one of them.
This commit is contained in:
parent
328ea83c25
commit
3c14a02770
6
main.go
6
main.go
@ -79,7 +79,11 @@ func checkMonitors(config *Config) error {
|
||||
Metrics.CountCheck(monitor.Name, success, monitor.LastCheckMilliseconds(), hasAlert)
|
||||
|
||||
if alertNotice != nil {
|
||||
return sendAlerts(config, monitor, alertNotice)
|
||||
err := sendAlerts(config, monitor, alertNotice)
|
||||
// If there was an error in sending an alert, exit early and bubble it up
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user