mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
tech(alerting): empty string does not update database
This commit is contained in:
parent
4154a4066f
commit
6d080904fa
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user