Skip to content

Lich

Monitoring and alerting server in Rust

L

Lich

Design stage 2026 - present

Monitoring and alerting server in Rust

Design of a Rust monitoring server with agents, a binary protocol over mTLS and alerts through email, SMS, Matrix and webhooks. Eight architecture decisions document the protocol, availability and security choices.

  • Rust
  • rustls
  • mTLS
  • TLS 1.3
  • X25519MLKEM768
  • PKI
  • Matrix
  • SMTP
  • IMAP
  • HAProxy
  • Grafana
  • systemd
  • MCP
  • RRDtool

Lich is at the design stage. The repository contains a Cargo workspace, configuration examples, service units and eight architecture decisions. The modules describe their roles but are not yet implemented.

The project plans to import monitoring history from RRD files. A separate binary would perform a one-time import using RRDtool’s XML output. Each data-source and archive pair would retain its consolidation function, resolution and origin. Unknown values would remain absent.

The binary protocol specifies network byte order and typed measurements from the first version. Planned tests will compare bytes against reference values to catch errors that an encode-decode round trip could miss.

The decoder must limit frame sizes, sample and label counts, string lengths and allocated memory. Counters will be checked before allocation. Invalid data must be rejected and counted without interrupting the server or hiding an incident. The sizing target is around 10,000 agents.

The planned default is a single node, with an optional active-passive mode. A witness at a third site would distinguish a node failure from a network partition. Without a witness, duplicate alerts are accepted, with automatic demotion and manual journal reconciliation. An isolated node must not take over. Simultaneous loss of many agents should produce a grouped loss-of-visibility incident.

Cryptography uses the TLS stack and its provider, with a central policy and hybrid post-quantum key exchange where supported. The decisions specify short-lived certificates, trust in multiple certificate authorities and metrics exposing negotiated algorithms. A local authority is planned for development, with Horizon providing secrets and certificates in production.

Language-model assistance stays outside critical alert processing. It may add annotations using read-only tools, without acknowledging or hiding incidents. Remediation actions will be declared by the host owner, with human approval by default. Alert data will be treated as untrusted to limit prompt injection.