page pending_logins from hh-hive-warning for hives without the needs-login gauge
This commit is contained in:
parent
790975ac8d
commit
1c3b37e46a
1 changed files with 22 additions and 18 deletions
|
|
@ -942,13 +942,14 @@ let
|
|||
}
|
||||
{
|
||||
# The needs-login alert is one instance per (hive, agent), fires after
|
||||
# 5 minutes on the gauge hive-c0re exports, and `hh-hive-warning` leaves
|
||||
# `pending_logins` to it so a login never pages twice. The disk rule is
|
||||
# 5 minutes on the gauge hive-c0re exports, and `hh-hive-warning` drops
|
||||
# `pending_logins` only for hives that export the gauge, so a login never
|
||||
# pages twice and a hive on an older hive-c0re still pages. The disk rule is
|
||||
# the presence control: it goes through the same lookup.
|
||||
# 🔬 Invert-proof: change `for`, `max by (hive, agent)` or the metric on
|
||||
# `hh-agent-needs-login`, drop `pending_logins` from `hh-hive-warning`,
|
||||
# or rename the gauge in `otel_metrics.rs`.
|
||||
name = "the needs-login alert is per agent, fires after 5 minutes and the hive warning rule skips pending_logins";
|
||||
# `hh-agent-needs-login`, exclude `pending_logins` from `hh-hive-warning` for every hive
|
||||
# instead of per hive (drop the `unless on (hive)` clause), or rename the gauge in `otel_metrics.rs`.
|
||||
name = "the needs-login alert is per agent, fires after 5 minutes and the hive warning rule skips pending_logins only for hives with the gauge";
|
||||
ok =
|
||||
let
|
||||
groups =
|
||||
|
|
@ -965,7 +966,9 @@ let
|
|||
&& lib.hasInfix ''{__name__="hyperhive.agent.needs_login"}'' (expr "hh-agent-needs-login")
|
||||
&& lib.hasInfix ''"hyperhive.agent.needs_login"'' source
|
||||
&& lib.hasInfix "max by (hive, agent)" (expr "hh-agent-needs-login")
|
||||
&& lib.hasInfix "pending_logins" (expr "hh-hive-warning")
|
||||
&& lib.hasInfix ''{__name__="hyperhive.hive.warning", kind="pending_logins"} unless on (hive) group by (hive) ({__name__="hyperhive.agent.needs_login"})'' (
|
||||
expr "hh-hive-warning"
|
||||
)
|
||||
&& lib.hasInfix "disk_pressure" (expr "hh-hive-warning");
|
||||
}
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue