feat(alerting): show execution errors in alert list

This commit is contained in:
Torkel Ödegaard
2016-08-18 11:37:35 +02:00
parent 5cf9711862
commit 09cdf3e9e1
4 changed files with 20 additions and 13 deletions
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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