grafana: make the hive degraded alert name the critical warning
The alert read the per-hive degraded gauge, so it could not say which warning raised it and sent the operator to a second alert. It now reads the critical warning series, one instance per kind, and the summary names the kind. The docs and the module-eval check follow. The message text is not in the alert, only in the hive-c0re log.
This commit is contained in:
parent
09de25b0ed
commit
928fe568dd
1 changed files with 31 additions and 8 deletions
|
|
@ -1754,18 +1754,20 @@ in
|
|||
for = "0s";
|
||||
summary = "{{ $labels._HOSTNAME }} detected agent {{ $labels.F_AGENT }}'s container crash (not an operator-initiated stop)";
|
||||
})
|
||||
# hive-c0re's own readiness verdict (`hyperhive.hive.degraded`
|
||||
# in otel_metrics.rs), the same one `/health/ready` gives:
|
||||
# `1` while any `crit`-level warning is raised. The
|
||||
# per-kind rule below says which one. `for` rides out a
|
||||
# hive-c0re's readiness verdict, the one `/health/ready`
|
||||
# gives: degraded while any `crit`-level warning is raised.
|
||||
# Read from the per-warning series (`hyperhive.hive.warning`)
|
||||
# rather than the `hyperhive.hive.degraded` gauge, so each
|
||||
# critical `kind` is its own instance and the alert names
|
||||
# the warning that triggered it. `for` rides out a
|
||||
# restart-time blip.
|
||||
(metricThresholdRule {
|
||||
uid = "hh-hive-degraded";
|
||||
title = "hive degraded";
|
||||
expr = ''max by (sender) ({__name__="hyperhive.hive.degraded"})'';
|
||||
expr = ''max by (sender, kind) ({__name__="hyperhive.hive.warning", level="crit"})'';
|
||||
threshold = 0;
|
||||
for = "2m";
|
||||
summary = "{{ $labels.sender }} reports itself degraded: a critical warning is raised; the `hh-hive-warning` alert names it";
|
||||
summary = "{{ $labels.sender }} is degraded by the critical warning {{ $labels.kind }}; the message is the `hive warning raised` line in the hive-c0re log";
|
||||
})
|
||||
# One series per raised warning (`hyperhive.hive.warning`),
|
||||
# so each `kind` is its own alert instance. The text is the
|
||||
|
|
|
|||
Loading…
Reference in a new issue