diff --git a/core/notifier/events.go b/core/notifier/events.go index a6a93246..fc55d1b4 100644 --- a/core/notifier/events.go +++ b/core/notifier/events.go @@ -52,7 +52,7 @@ func OnFailure(s *types.Service, f *types.Failure) { sendMessages: for _, comm := range AllCommunications { - if isType(comm, new(BasicEvents)) && isEnabled(comm) && inLimits(comm) { + if isType(comm, new(BasicEvents)) && isEnabled(comm) && (s.Online || inLimits(comm)) { notifier := comm.(Notifier).Select() utils.Log(1, fmt.Sprintf("Sending failure %v notification for service %v", notifier.Method, s.Name)) comm.(BasicEvents).OnFailure(s, f) @@ -72,7 +72,7 @@ func OnSuccess(s *types.Service) { } for _, comm := range AllCommunications { - if isType(comm, new(BasicEvents)) && isEnabled(comm) && inLimits(comm) { + if isType(comm, new(BasicEvents)) && isEnabled(comm) && (!s.Online || inLimits(comm)) { notifier := comm.(Notifier).Select() utils.Log(1, fmt.Sprintf("Sending successful %v notification for service %v", notifier.Method, s.Name)) comm.(BasicEvents).OnSuccess(s)