$ show valeriansaliou/vigil
Vigil is a microservices status page application written in Rust. It monitors distributed infrastructure services via multiple probe modes (HTTP, TCP, SSH, ICMP, push, script, local), aggregates their health status, and serves a public status page with real-time updates. It also sends alerts through various channels (Slack, Email, Twilio, Telegram, etc.) when services go down or recover. The architecture is a single binary with separate threads for probing, aggregation, and HTTP serving, using a shared in-memory state protected by RwLock. The codebase is well-structured, with clear separation of concerns: config reader, prober, notifier, aggregator, and responder modules. It includes an MCP server for AI agent integration. The project is actively maintained with recent commits and CI/CD pipelines.
The LLM identified 3 files worth highlighting for reuse:
Defines a GenericNotifier trait and Notification struct that standardizes how alerts are dispatched across multiple channels. The trait requires implementors to define `attempt`, `can_notify`, and `name` methods, and provides retry logic with exponential backoff. This pattern is reusable for any system that needs to send notifications through multiple providers with consistent retry and escalation semantics.
Implements a ReplicaURL enum that parses custom URL schemes (icmp, tcp, ssh, http, https) into typed variants. The `parse_from` method handles IPv6 address formatting correctly. This is a clean, self-contained URL parser that could be extracted for any project needing to parse non-standard URI schemes.
Reads TOML configuration files and substitutes environment variables using the `envsubst` crate. Includes validation of duplicate identifiers across services and nodes. This pattern is reusable for any Rust application that needs to load configuration with environment variable interpolation and structural validation.