From 6d080904fac49a7ff48750484220df98c20fd415 Mon Sep 17 00:00:00 2001 From: bergquist Date: Wed, 17 Aug 2016 22:13:27 +0200 Subject: [PATCH] tech(alerting): empty string does not update database --- pkg/services/alerting/result_handler.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/services/alerting/result_handler.go b/pkg/services/alerting/result_handler.go index af9bb7f8e7b..c6dfdfeb2a3 100644 --- a/pkg/services/alerting/result_handler.go +++ b/pkg/services/alerting/result_handler.go @@ -29,7 +29,7 @@ func NewResultHandler() *DefaultResultHandler { func (handler *DefaultResultHandler) Handle(ctx *EvalContext) { oldState := ctx.Rule.State - exeuctionError := "" + exeuctionError := " " if ctx.Error != nil { handler.log.Error("Alert Rule Result Error", "ruleId", ctx.Rule.Id, "error", ctx.Error) ctx.Rule.State = m.AlertStateExeuctionError @@ -41,7 +41,6 @@ func (handler *DefaultResultHandler) Handle(ctx *EvalContext) { } countSeverity(ctx.Rule.Severity) - if ctx.Rule.State != oldState { handler.log.Info("New state change", "alertId", ctx.Rule.Id, "newState", ctx.Rule.State, "oldState", oldState)