Commit Graph

5 Commits (66d4d021ba2be412f846107da6982b9d4317fa6c)

Author SHA1 Message Date
mirivlad d03aff714f feat: Add offline monitoring and default settings
- Add offline_timeout and notify_on_offline fields to servers table
- Create default_settings table for configurable defaults
- Create offline_alerts table for tracking offline events
- Add sendOfflineNotification/sendOnlineNotification methods
- Create check_offline.php CRON script for periodic checks
- Add admin page for default settings management
- Add offline settings to server edit form
- Apply default values when creating new servers

Usage: Add to CRON - * * * * * php /var/www/mon/public/check_offline.php
2026-04-17 15:22:17 +08:00
mirivlad bce4c2e2d0 fix: Update agent install, disk metrics, fallback blocks, and dynamic thresholds
BREAKING: install.sh now downloads agent from server instead of embedding it

Changes:
- AgentController: downloadAgent() method for serving agent.py with token auth
- AgentController: rewrite generateInstallScript() to curl agent from server
- agent.py: copy production version from server (with temp, disk, network metrics)
- agent.py: fix get_disk_metrics() to use priority mountpoints (/, /home, etc)
- agent.py: fix disk_total_gb collection to use priority mountpoints
- detail.twig: add fallback blocks for temperatures (alert-info)
- detail.twig: add fallback blocks for disk doughnuts (alert-warning)
- detail.twig: add fallback blocks for network graphs (alert-warning)
- detail.twig: add null check for ramTotalGB in tooltip
- detail.twig: improve thresholds form with human-readable labels and units
- ServerDetailController: query only metrics that exist on server and display on graphs

For server 3 (mirv.top):
- After deploy, download new install.sh and reinstall agent
- This will add disk_used_root, ram_total_gb, temperatures support
2026-04-17 09:25:43 +08:00
mirivlad e4588f7044 fix: correct PHP-native bcrypt hash for admin password mirvmon2026
- Migration 007: PHP-native $2y$ hash (not Python $2b$)
- docker/.env excluded from git
- APP_PORT set to 8082 (avoid conflicts with existing nginx)
- Verified: login with admin/mirvmon2026 works correctly

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 16:34:40 +08:00
mirivlad 3ba8629146 unify config: single .env.example, default password mirvmon2026, docker in README
- .env.example moved to project root (used by both Docker and manual install)
- Migration 007: admin password = mirvmon2026 (bcrypt hash)
- docker-compose.yml reads ../.env from root
- deploy.sh generates DB passwords, shows default admin password
- README.md updated with Docker install section (Variant A) and manual (Variant B)
- Consistent default credentials everywhere: admin/mirvmon2026

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 16:20:01 +08:00
mirivlad 6d8bd99277 Docker: production-ready setup with immutable images, versioned migrations, env vars
- Dockerfile: PHP 8.3 FPM + composer install (no dev)
- docker-compose.yml: app + nginx + MariaDB 10.11
- Versioned migrations (001-007) with schema_migrations tracking
- DatabaseConfig.php: env vars with fallbacks
- init.sh: wait-for-db + auto-migrate
- nginx.conf: reverse proxy + gzip + security rules
- .env.example: config template
- .dockerignore: build optimization

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 15:51:14 +08:00