mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-13 17:14:05 -08:00
Don't log rule evaluation failure on shutdown
This commit is contained in:
parent
7e1b39c682
commit
a8c38c3ac5
|
@ -220,9 +220,13 @@ func (g *Group) eval() {
|
||||||
|
|
||||||
vector, err := rule.eval(now, g.opts.QueryEngine)
|
vector, err := rule.eval(now, g.opts.QueryEngine)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
evalFailures.Inc()
|
// 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)
|
log.Warnf("Error while evaluating rule %q: %s", rule, err)
|
||||||
}
|
}
|
||||||
|
evalFailures.Inc()
|
||||||
|
}
|
||||||
var rtyp ruleType
|
var rtyp ruleType
|
||||||
|
|
||||||
switch r := rule.(type) {
|
switch r := rule.(type) {
|
||||||
|
|
Loading…
Reference in a new issue