weirdnet-alerts-0.1.0 has been yanked.
weirdnet-alerts
Node health alerts for Weirdnet nodes and daemons.
- Rules: observations (
engine.crash_loop,net.route,disk,gpu, or your own kinds) are matched againstweirdnet-rulesRuleSpecs whose then-actions arefail,okorevent. Keys and titles are templates over the observation's fields ({host}is always there).rules::default_rulescovers engines, the default route (Wi-Fi or missing), free disk and GPU temperature, with hysteresis. - Dedupe: a failing key alerts at most once per repeat interval (default an hour), and one recovery notice goes out when it clears. Events are deduped like failures.
- Sinks: SMTP (lettre, STARTTLS or TLS; plain SMTP only to a loopback relay), JSON webhooks
(https, or http to loopback), the log, an in-memory sink, and with the
pushfeature phone wakes throughweirdnet-push. Every network sink has a dry-run mode that records what it would send. Sink failures are logged, never returned. - Secrets are references,
env:NAMEorfile:/path, never values in the config. - Probes: default route (Linux
ip route get), free disk (Unixstatvfs), GPU temperature (nvidia-smi). Elsewhere they report nothing. - Config:
AlertsConfig(serde, TOML-friendly) builds the alerter and its sinks.
use ;
let cfg: AlertsConfig = from_str?;
let alerter = cfg.alerter?.with_product;
alerter.observe.await;
Features
push:PushSinkwakes the owner's devices (WakeCards) with reasonMessageWaiting. The wake carries no alert content; the woken app fetches alerts from the node over Weirdnet. This pulls inweirdnet-push's HTTPS client (reqwest with rustls, which uses aws-lc), so leave it off for BSD cross builds.backends:engine::observationturnsweirdnet-backendsSupervisorEvents intoengine.<kind>observations, andengine::monitorfeeds them and the probes to an alerter until stopped.