How qzqmn/monitor works
VPS Monitor is a self-hosted, multi-machine monitoring system: an Agent on each host samples machine and network metrics and reports them to a central Rust server, which stores current status and cumulative traffic for the dashboard. Administrators authenticate to manage agents, traffic settings, and alert channels. The README also documents latency and GeoIP capabilities; the sampled Agent excerpt shows GeoIP lookup but not latency-probe implementation, so no latency-probe wiring is asserted. The sampled sources establish report, persistence, auth, and notification flows; dashboard interactions are represented at the documented product level.
Main entry points: src/main.rs HTTP routing · db.rs Status and settings · notify.rs Alert checks · src/main.rs Agent runtime
Components 18
Host Agent
- Agent runtime
agent/src/main.rs - Metric collection
agent/src/main.rs - GeoIP lookup
agent/src/main.rs
Monitoring Server
- Report endpoint
server/src/api.rs - HTTP routing
server/src/main.rs - Status and settings
server/src/db.rs - Agent management
server/src/agents.rs - Admin authentication
server/src/auth.rs - Traffic reset
server/src/db.rs
Admin and Dashboard
- Status dashboard
server/static/index.html - Admin console
server/static/admin.html
Alerts and Integrations
- Alert checks
server/src/notify.rs - Telegram
- Webhook receiver
Other components
- Monitored host
- ip-api.com
- SQLite database
- Administrator
Connections 25
- Monitored host → Agent runtime: runs
- Agent runtime → Metric collection: collects
- Agent runtime → GeoIP lookup: looks up
- GeoIP lookup → ip-api.com: queries
- Agent runtime → HTTP routing: reports metrics
- HTTP routing → Report endpoint: dispatches
- Report endpoint → Status and settings: upserts status
- Status and settings → SQLite database: reads and writes
- Report endpoint → Alert checks: checks report alerts
- HTTP routing → Alert checks: checks offline
- HTTP routing → Traffic reset: runs periodic reset
- Traffic reset → Status and settings: resets due traffic
- Alert checks → Status and settings: loads settings and status
- Alert checks → Telegram: sends alerts
- Alert checks → Webhook receiver: posts alerts
- Administrator → Status dashboard: views
- Administrator → Admin console: manages
- Status dashboard → HTTP routing: requests status
- Admin console → HTTP routing: calls admin APIs
- HTTP routing → Admin authentication: dispatches auth
- Admin authentication → Status and settings: reads and writes sessions
- HTTP routing → Agent management: dispatches management
- Agent management → Status and settings: manages agent records
- HTTP routing → Status and settings: serves status and settings
- HTTP routing → Alert checks: tests notifications