swarm-controller: move the observability concern into its own module
Refs #6897
This commit is contained in:
parent
9b2ba275d8
commit
cd8feedf73
1 changed files with 32 additions and 27 deletions
|
|
@ -457,7 +457,7 @@ let
|
|||
e: map lib.head (lib.filter lib.isList (builtins.split ''"(hyperhive\.vcs\.[a-z_.]+)"'' e))
|
||||
) exprs
|
||||
);
|
||||
recordedVcs = builtins.readFile ../../swarm-controller/src/vcs_metrics.rs;
|
||||
recordedVcs = builtins.readFile ../../swarm-controller/src/observability/vcs_metrics.rs;
|
||||
in
|
||||
lib.elem "forge.json" shipped
|
||||
&& lib.elem "bao.json" shipped
|
||||
|
|
@ -1143,17 +1143,17 @@ let
|
|||
}
|
||||
{
|
||||
# The held-deploys alert fires on any agent held for 30 minutes and
|
||||
# selects the gauge name `held_deploys.rs` spells in Rust. The disk rule
|
||||
# selects the gauge name `observability/held_deploys.rs` spells in Rust. The disk rule
|
||||
# is the presence control: it goes through the same lookup.
|
||||
# 🔬 Invert-proof: change `for = "30m"` or the selector on
|
||||
# `hh-deploys-held` in swarm-grafana.nix, or `METRIC` in held_deploys.rs.
|
||||
# `hh-deploys-held` in swarm-grafana.nix, or `METRIC` in observability/held_deploys.rs.
|
||||
name = "the held-deploys alert fires after 30 minutes on the gauge swarm-controller exports";
|
||||
ok =
|
||||
let
|
||||
groups =
|
||||
grafanaHere.containers.swarm-grafana.config.services.grafana.provision.alerting.rules.settings.groups;
|
||||
rules = lib.concatMap (g: g.rules) groups;
|
||||
source = builtins.readFile ../../swarm-controller/src/held_deploys.rs;
|
||||
source = builtins.readFile ../../swarm-controller/src/observability/held_deploys.rs;
|
||||
rule = uid: lib.findFirst (r: r.uid == uid) null rules;
|
||||
held = rule "hh-deploys-held";
|
||||
threshold =
|
||||
|
|
|
|||
Loading…
Reference in a new issue