Documentation
Bewitch is a system monitoring daemon (bewitchd) and TUI client (bewitch) for Linux, built with Go and DuckDB. It collects CPU, memory, disk, network, temperature, power, and process metrics, stores them in DuckDB, and provides a rich interactive interface with historical charts, alerting, and a SQL REPL.
Architecture
bewitchd (daemon)
├── Collectors (procfs/sysfs, parallel goroutines) → Store (DuckDB)
├── Alert Engine (threshold + predictive + variance → notifications)
├── Pruner / Compactor / Archiver
└── API Server
├── Unix socket (always, plain HTTP)
└── TCP listener (optional, TLS by default)
bewitch (TUI)
└── Daemon Client (unix socket or TCP+TLS)
bewitch repl (SQL console)
└── Daemon Client (POST /api/query)Sections
Installation
Debian package, manual install, and systemd setup.
Configuration
Complete TOML config reference with all options.
Collectors
All 8 metric collectors: CPU, memory, disk, network, ECC, temperature, power, process.
TUI Guide
Views, navigation, keybindings, debug mode, and process pinning.
Alerts
Threshold, predictive, and variance rules with multi-channel notifications.
SQL REPL
Interactive DuckDB console with dot-commands and data export.
Remote Access
TLS with TOFU fingerprint pinning and bearer token authentication.
API Reference
HTTP endpoints for metrics, alerts, history, query, export, and more.
Storage & Archival
DuckDB storage, retention, compaction, Parquet archival, and snapshots.