feat(alerting): show execution errors in alert list
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ type AlertSeverityType string
|
||||
|
||||
const (
|
||||
AlertStatePending AlertStateType = "pending"
|
||||
AlertStateExeuctionError AlertStateType = "exeuction_error"
|
||||
AlertStateExeuctionError AlertStateType = "execution_error"
|
||||
AlertStatePaused AlertStateType = "paused"
|
||||
AlertStateCritical AlertStateType = "critical"
|
||||
AlertStateWarning AlertStateType = "warning"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user