Watch
0
0
Fork
You've already forked hyperhive
0

document budgeted-agent swap and oom metrics; add oom kills panel

This commit is contained in:
atlas 2026-11-11 01:58:30 +01:00
commit c014b48c22

View file

@ -547,6 +547,25 @@ let
&& lib.any (e: lib.hasInfix "swarm_queue.publish_skipped" e) exprs
&& lib.hasInfix "hyperhive.container.cpu.percent" connected;
}
{
# The agents board's health tab shows OOM kills per agent from the counter
# hive-c0re exports. A renamed instrument is an empty panel, so the name
# must still be spelled in the exporter and read by a panel on that tab.
name = "the agents dashboard's health tab reads the OOM-kill counter hive-c0re exports";
ok =
let
board = builtins.fromJSON (builtins.readFile ../host-modules/swarm-grafana/dashboards/agents.json);
tab = lib.findFirst (t: t.spec.title == "health") null board.spec.layout.spec.tabs;
names = map (i: i.spec.element.name) tab.spec.layout.spec.items;
exprs = lib.concatMap (
n: map (q: q.spec.query.spec.expr) board.spec.elements.${n}.spec.data.spec.queries
) names;
exported = builtins.readFile ../../hive-c0re/src/stats/otel_metrics.rs;
in
tab != null
&& lib.hasInfix "\"hyperhive.container.memory.oom_kills\"" exported
&& lib.any (e: lib.hasInfix "hyperhive.container.memory.oom_kills" e) exprs;
}
{
# The agents board's turns tab reads the turn, tool, bash command, reminder
# and session metrics the harness records, grouped by the labels it sets on them. A renamed instrument or