monitoring: alert when the services-host agent goes silent #605

Stängd
öppnade 2026-10-08 21:12:21 +00:00 av supernaut · 0 kommentarer
Ägare

What

Most staleness rules have the form time() - metric > N. They return nothing when the series is absent. Only BackupHotStale uses absent() (alert-rules.yml.j2:245). ScrapeTargetDown is up == 0 (:663). The up series for the services host comes from the services-host vmagent.

Extends #595, which covers only the Watchdog heartbeat.

Why

If that one agent stops, nearly every rule from that host goes quiet instead of firing. The cross-probe checks the monitoring VM from the services host, not the reverse. Only the blackbox endpoint probes keep working. vmagent, alloy and node-exporter are not in monitoring_core_units either.

Failing case

vmagent crash-loops, or remote_write fails, or node-exporter stops. BackupStale, ReconcilerStale, RegistryRetentionStale and UnitMetricStale all evaluate to empty. No alert fires. The operator learns about a failed backup from a user.

Fix

Add absent(up{job="node",host="<services host label>"}) for 10m at critical severity. monitoring_host_label has different values in the monitoring and monitoring-agent role defaults, so use one variable. Add absent() to the other staleness rules where a missing series should alert. Consider adding the three agent units to monitoring_core_units.

Done when

  • Stopping vmagent on staging fires the new alert within its for: window.
  • Each staleness rule either uses absent() or is covered by the new rule.
  • scripts/check-alert-rules.py passes.
## What Most staleness rules have the form `time() - metric > N`. They return nothing when the series is absent. Only `BackupHotStale` uses `absent()` (`alert-rules.yml.j2:245`). `ScrapeTargetDown` is `up == 0` (`:663`). The `up` series for the services host comes from the services-host vmagent. Extends #595, which covers only the Watchdog heartbeat. ## Why If that one agent stops, nearly every rule from that host goes quiet instead of firing. The cross-probe checks the monitoring VM from the services host, not the reverse. Only the blackbox endpoint probes keep working. `vmagent`, `alloy` and `node-exporter` are not in `monitoring_core_units` either. ## Failing case vmagent crash-loops, or remote_write fails, or node-exporter stops. `BackupStale`, `ReconcilerStale`, `RegistryRetentionStale` and `UnitMetricStale` all evaluate to empty. No alert fires. The operator learns about a failed backup from a user. ## Fix Add `absent(up{job="node",host="<services host label>"})` for 10m at critical severity. `monitoring_host_label` has different values in the monitoring and monitoring-agent role defaults, so use one variable. Add `absent()` to the other staleness rules where a missing series should alert. Consider adding the three agent units to `monitoring_core_units`. ## Done when - [ ] Stopping vmagent on staging fires the new alert within its `for:` window. - [ ] Each staleness rule either uses `absent()` or is covered by the new rule. - [ ] `scripts/check-alert-rules.py` passes.
Logga in för att delta i denna konversation.
Ingen milstolpe
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra#605
Ingen beskrivning angiven.