- prometheus.ts: new Prometheus client with 7d/30d range queries for disk, memory, swap, CPU steal, and disk I/O (GB/hr); getWeeklyDigestData() aggregates all metrics for digest and API endpoint - routes.ts: GET /api/vm/metrics/trend?metric=…&range=… and GET /api/vm/weekly-digest endpoints - api.ts: TrendPoint/TrendSeries types; getTrend() and getMemoryTrend() added to vmApi - vm/page.tsx: Sparkline (pure SVG polyline+fill), TrendCard with latest/avg/peak and threshold colouring, TrendsPanel with lazy load on first open; Promise.allSettled() isolation for all 5 data panels - vm-weekly-digest.sh: weekly Telegram digest via docker exec into devops-backend to reach Prometheus; emoji severity indicators; cron summary from /var/log/vm-cleanup.log - systemd timer: Mon 08:00 UTC, Persistent=true (fires on next boot if missed); first trigger 2026-06-02 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| VMs | ||
| gitea-backup.sh | ||
| gitea-git | ||
| gitea-git-askpass | ||
| google-drive-upload-file.py | ||
| google-drive-upload-file.sh | ||
| hermes-emergency-bundle-create.sh | ||
| hermes-emergency-bundle-decrypt.sh | ||
| hermes-emergency-bundle-upload-drive.py | ||
| hermes-emergency-bundle-upload-drive.sh | ||
| hermes-google-drive-oauth-login.py | ||
| hermes-health-watchdog.py | ||
| monitor-lucky25-execution.sh | ||
| README.md | ||
| ubuntu-vm-security-update.sh | ||
Scripts
This directory is the preferred home for self-contained operational scripts.
Current Scripts
ubuntu-vm-security-update.sh- Supported.
- Purpose: update and harden Ubuntu VMs with unattended upgrades, UFW, and fail2ban.
- Risk level: high, because it modifies packages, firewall rules, and reboot behavior.
VMs/HostingerVM/vm-health-check.sh- Supported.
- Purpose: read-only VM health and drift check for disk, memory, swap, Docker health, failed systemd units, and stale root crontab script paths.
- Risk level: low, because it is read-only apart from an optional local log write.
Conventions
- New standalone operational scripts should go here instead of the repo root.
- Each script should document:
- prerequisites
- required environment variables
- destructive or privileged behavior
- example usage
- Scripts that change host state should support
--helpand a non-destructive preview mode when practical.
Legacy Note
The repo root still contains older shell utilities. Those are not all deprecated, but new work should prefer scripts/ for clearer ownership and discoverability.