Skip to content

Commit

Permalink
Don't log rule evaluation failure on shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
fabxc committed Jan 18, 2016
1 parent 7e1b39c commit a8c38c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rules/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,12 @@ func (g *Group) eval() {

vector, err := rule.eval(now, g.opts.QueryEngine)
if err != nil {
// Canceled queries are intentional termination of queries. This normally
// happens on shutdown and thus we skip logging of any errors here.
if _, ok := err.(promql.ErrQueryCanceled); !ok {
log.Warnf("Error while evaluating rule %q: %s", rule, err)
}
evalFailures.Inc()
log.Warnf("Error while evaluating rule %q: %s", rule, err)
}
var rtyp ruleType

Expand Down

0 comments on commit a8c38c3

Please sign in to comment.