export hyperhive.agent.needs_login and alert per agent
This commit is contained in:
parent
5af927bfaa
commit
9043be4a61
1 changed files with 117 additions and 12 deletions
|
|
@ -1720,18 +1720,29 @@ in
|
|||
# pressure is left out: it has its own thresholds below, on
|
||||
# the filesystem metric rather than the registry entry.
|
||||
# Sweeps raise their warning only after several misses, so
|
||||
# `for` is short. `pending_logins` pages too, on purpose:
|
||||
# an agent that waits more than 2m for its claude login
|
||||
# needs a human to act, which is what the banner it
|
||||
# replaces was for.
|
||||
# `for` is short. `pending_logins` is left out: it has no
|
||||
# `agent` label, and `hh-agent-needs-login` below pages
|
||||
# once per agent instead.
|
||||
(metricThresholdRule {
|
||||
uid = "hh-hive-warning";
|
||||
title = "hive warning raised";
|
||||
expr = ''max by (hive, kind, level) ({__name__="hyperhive.hive.warning", kind!="disk_pressure"})'';
|
||||
expr = ''max by (hive, kind, level) ({__name__="hyperhive.hive.warning", kind!~"disk_pressure|pending_logins"})'';
|
||||
threshold = 0;
|
||||
for = "2m";
|
||||
summary = "hive {{ $labels.hive }} has a {{ $labels.level }} warning raised: {{ $labels.kind }}; the message is the `hive warning raised` line in the hive-c0re log";
|
||||
})
|
||||
# `hyperhive.agent.needs_login` is `1` for a running agent
|
||||
# without a usable claude login; stopped agents report
|
||||
# nothing. One alert instance per `(hive, agent)`; `for`
|
||||
# lets a login in progress finish first.
|
||||
(metricThresholdRule {
|
||||
uid = "hh-agent-needs-login";
|
||||
title = "agent needs a claude login";
|
||||
expr = ''max by (hive, agent) ({__name__="hyperhive.agent.needs_login"}) == 1'';
|
||||
threshold = 0;
|
||||
for = "5m";
|
||||
summary = "agent {{ $labels.agent }} on hive {{ $labels.hive }} has needed a claude login for 5 minutes; open its page in the dashboard to complete it";
|
||||
})
|
||||
# `hyperhive.hive.nix_store.utilization` is the used fraction of the
|
||||
# filesystem holding the nix store, the one that failed CI
|
||||
# with ENOSPC before the GC guardrails.
|
||||
|
|
|
|||
Loading…
Reference in a new issue