Expand description
Node health alerts: rule packs over observations, dedupe with recovery notices, and sinks.
Rules are weirdnet_rules::RuleSpecs; only the spec, matching and comparison parts of
weirdnet-rules are used, so the alerter is Send and can live in an async daemon.
Alerter: matchesObservations against rules, dedupes per key (a failing key alerts at most once per repeat interval) and sends one recovery notice when it clears.rules::default_rules: engine, route, disk and GPU rules.sinks: SMTP, JSON webhooks, the log, memory, and (featurepush) phone wakes throughweirdnet-push. Every network sink has a dry-run mode.probe: default route, free disk and GPU temperature probes.config::AlertsConfig: a TOML/serde config that builds the alerter and its sinks; secrets are references (env:NAME,file:/path), never values.backendsfeature:engine::observationturnsweirdnet-backendssupervisor events into observations, andengine::monitorfeeds them and the probes to an alerter.
Re-exports§
pub use config::AlertsConfig;pub use sinks::PushSink;pub use sinks::LogSink;pub use sinks::MemorySink;pub use sinks::Sink;pub use sinks::SmtpSink;pub use sinks::WebhookSink;
Modules§
- config
- The alerts section of an application’s config (TOML or any serde format).
- engine
weirdnet-backendsengines as alert observations (featurebackends).- probe
- Health probes that turn into
Observations. - rules
- The default rule pack: engines, the default route, free disk and GPU temperature, as
weirdnet-rulesspecs. - sinks
- Where alerts go.
Structs§
- Alert
- One message to send.
- Alerter
- Matches observations against rules, dedupes, and hands alerts to the sinks.
- Observation
- Something a node saw:
kind(engine.crash_loop,net.route,disk) and its fields.
Enums§
- Action
- What a matching rule does.
keyandtitleare templates:{field}from the observation ({host}is always there), plus{now}and{date}. - Alert
Status