Service monitoring dashboard built with Sigil
- Shell 100%
|
David Wilson
327690aa88
Merge task/adopt-runit-supervision
Add runit supervision templates under deploy/runit/. Production rollout completed in the sc-ops adopt-runit-supervision task — /etc/service/vigil/ is supervised by runit (currently in down state pending a vigil rebuild; the known-broken binary from 2026年04月20日 is being tracked separately). See folio procedures/openbsd-runit-supervision for the replication guide. |
||
|---|---|---|
| deploy/runit | Add runit supervision templates | |
| scripts | Add deploy script for 0x11.run | |
| src/vigil | main: use sigil-http's start-sse-heartbeat! for dead-client detection | |
| .gitignore | Initial project scaffold for Vigil service monitor | |
| dev-redirects.sgl | Fix SSE connection leaks and track tailer processes for cleanup | |
| package.sgl | Fix SSE connection leaks and track tailer processes for cleanup | |
| README.md | Add comprehensive README with configuration docs | |
| vigil-prod.sgl | Update health check URLs to use /_health endpoints | |
| vigil.sgl | Fix string-contains? typo and restore host binding in config | |
Vigil
Lightweight service monitoring dashboard built with Sigil. Monitors running services via HTTP health checks and provides a real-time web dashboard with live status updates, log viewing, and Telegram alerting.
Features
- HTTP health checks with configurable intervals
- Real-time dashboard with SSE live updates
- Service detail pages with check history and response times
- Log ingester — tail service log files and view on the dashboard
- Telegram alerts on service state transitions (with flap protection)
- Uptime tracking and status history
Configuration
Vigil reads a Scheme config file:
(vigil
host: "0.0.0.0" ;; bind address (default: all interfaces)
port: 8400 ;; dashboard port
check-interval: 30 ;; seconds between health checks
;; Optional: Telegram alerting
telegram: (telegram-config
;; Token and chat ID can also be set via
;; VIGIL_TELEGRAM_TOKEN and VIGIL_TELEGRAM_CHAT_ID env vars
token: "bot-token"
chat-id: "chat-id"
flap-threshold: 3 ;; consecutive failures before alerting
alert-on-recovery?: #t) ;; notify when service comes back up
services: (list
(service
name: "my-app"
description: "My web application"
check: (http-check url: "http://localhost:8080/_health")
logs: (file-log path: "/var/log/my-app.log"))
(service
name: "external-site"
description: "External website"
check: (http-check url: "https://example.com"))))
Health Checks
- http-check — GET a URL, check for 2xx status code, measure response time
Log Sources
- file-log — tail a log file. Supports JSON lines (structured) and plain text. Parses ISO 8601 timestamps from log entries.
Usage
# Start the monitoring server
vigil serve --config vigil.sgl
# Check a single service
vigil check my-app --config vigil.sgl
# Show configured services
vigil status --config vigil.sgl
Building
# Development build
guix shell -m ../sigil/manifest.scm -- sigil build vigil --redirects dev-redirects.sgl
# Cross-compile for OpenBSD arm64
../sigil/scripts/with-zig sigil build vigil --config openbsd-arm64 --redirects dev-redirects.sgl
Dependencies
| Package | Purpose |
|---|---|
| sigil-http | HTTP server and health check client |
| sigil-web | Web framework, SSE, routing |
| sigil-json | Parsing structured log entries |
| sigil-sxml | HTML templating |
| sigil-css | Base CSS DSL |
| sigil-web-styles | Shared design system (black+gold theme) |
| sigil-telegram | Telegram Bot API for alerts |
| sigil-tls | HTTPS health checks |
License
BSD-3-Clause