Status Monitor: Pantau Server & Website dengan WhatsApp Notifikasi

🔍 Status Monitor dengan WhatsApp Alerts
Real-time monitoring dashboard untuk memantau status server, website, API, dan layanan dengan notifikasi WhatsApp otomatis ketika terjadi masalah.
✨ Fitur Utama
🔍 Monitoring Comprehensive
- HTTP/HTTPS Monitoring - Cek status website dan API
- Port Connectivity - Monitor database, cache, mail server
- SSL Certificate Monitoring - Alert sebelum certificate expired
- Response Time Tracking - Mengukur performa dalam milliseconds
- Auto Incident Detection - Deteksi masalah dan recovery otomatis
📱 WhatsApp Integration
- Real-time Alerts - Notifikasi WhatsApp otomatis saat incident
- Recovery Notifications - Alert ketika service kembali normal
- Configurable Types - Pilih jenis incident yang di-notify
- Test Functionality - Test kirim pesan WhatsApp langsung
🎨 Modern Dashboard
- Dark/Light Mode - Theme switching otomatis
- Mobile Responsive - Optimized untuk semua device
- Real-time Updates - Auto-refresh setiap 60 detik
- Interactive Charts - Visual status indicators
⚙️ Admin Panel Lengkap
- Services Management - Add/Edit/Delete services monitoring
- Maintenance Scheduling - Jadwal maintenance terjadwal
- Incidents History - Riwayat semua incidents dengan detail
- User Management - Multiple admin users
- Notifications Settings - Konfigurasi WhatsApp API dan preferences
- Analytics Dashboard - Visitor analytics dan system stats
🚀 Quick Start
Prerequisites
- Python 3.8+
- Flask 2.3+
- SQLite (included)
Installation
- Clone repository:
git clone https://github.com/yourusername/status-monitor-whatsapp.git cd status-monitor-whatsapp
- Install dependencies:
pip install -r requirements.txt
- Setup folder structure:
mkdir templates static # Copy semua file HTML ke folder templates/
- Jalankan aplikasi:
python app.py
- Akses dashboard:
- Public Dashboard: http://localhost:5555
- Admin Panel: http://localhost:5555/admin/login
- Default Admin: username=
admin
, password=admin123
📁 Struktur Project
status-monitor/ ├── app.py # Main Flask application ├── requirements.txt # Python dependencies ├── README.md # Documentation ├── templates/ # HTML templates │ ├── index.html # Public status page │ ├── admin_login.html # Admin login │ ├── admin_dashboard.html # Admin dashboard │ ├── admin_services.html # Services management │ ├── admin_maintenance.html # Maintenance management │ ├── admin_incidents.html # Incidents view │ ├── admin_notifications.html # WhatsApp settings │ └── admin_settings.html # Admin settings ├── static/ # Static files (optional) │ ├── css/ │ └── js/ ├── monitoring.db # SQLite database (auto-created) ├── LICENSE # MIT License └── .gitignore # Git ignore file
⚙️ Konfigurasi
1. WhatsApp API Setup
Untuk mengaktifkan notifikasi WhatsApp:
- Akses Admin Panel:
/admin/notifications
- Configure API Settings:API Key: Dapatkan dari provider WhatsApp API
- Sender: Nomor WhatsApp device (dengan kode negara)
- Endpoint: URL API endpoint
- Test Connection: Gunakan fitur "Send Test" untuk verifikasi
2. Services Configuration
Tambah layanan yang ingin dimonitor:
- Akses Services Management:
/admin/services
- Add New Service:HTTP/HTTPS: Website, API endpoints
- Port Check: Database, Cache, Mail servers
- Configure Settings: Timeout, expected response codes
3. Notification Preferences
Atur preferensi notifikasi:
- Enable/Disable: Toggle WhatsApp notifications
- Phone Number: Nomor penerima alert
- Incident Types: Pilih jenis incident yang di-notify:
- 🔴 Service Down
- 🟡 Performance Issues
- 🔒 SSL Certificate Expiring
- 🐌 High Response Time
🔧 API Endpoints
Public API
GET /api/status
- Status semua layananGET /api/incidents
- Riwayat incidentsGET /api/maintenance
- Jadwal maintenanceGET /api/uptime/<service_name>
- Statistik uptime
Admin API
POST /api/notification_settings
- Update notif settingsPOST /api/whatsapp_config
- Update WhatsApp configPOST /api/test_whatsapp
- Test WhatsApp notificationGET /api/notification_logs
- Log notifikasi
📊 Database Schema
Aplikasi menggunakan SQLite dengan tables:
- services - Konfigurasi layanan monitoring
- service_status - History status monitoring
- incidents - Auto-generated incidents
- maintenance - Scheduled maintenance
- notification_logs - WhatsApp notification logs
- admin_users - Admin authentication
- visitor_analytics - SEO tracking
🎯 Use Cases
1. Web Hosting Provider
- Monitor customer websites uptime
- Alert team untuk service disruptions
- Track SLA compliance
2. E-commerce Business
- Monitor website, API, payment gateway
- Alert untuk performance issues
- Track SSL certificate expiry
3. IT Infrastructure
- Monitor internal services
- Database connectivity checks
- Server health monitoring
4. DevOps Teams
- CI/CD pipeline monitoring
- Microservices health checks
- Infrastructure status dashboard
🔒 Security
- Password Hashing: SHA256 encryption
- Session Management: Flask sessions
- Input Validation: Server-side validation
- SQL Injection Protection: Parameterized queries
🌍 Timezone
Aplikasi menggunakan timezone Asia/Jakarta (WIB) untuk semua timestamp dan notifikasi.
🤝 Contributing
- Fork repository
- Create feature branch:
git checkout -b feature-name
- Commit changes:
git commit -am 'Add feature'
- Push to branch:
git push origin feature-name
- Submit Pull Request
📄 License
Project ini menggunakan MIT License - bebas digunakan untuk personal dan komersial.
🙏 Acknowledgments
- Flask - Python web framework
- Tailwind CSS - Utility-first CSS framework
- Font Awesome - Icon library
- SQLite - Embedded database
- WhatsApp API - Messaging integration
📞 Support
Jika ada pertanyaan atau butuh bantuan:
- Create Issue: GitHub Issues
- Email: [email protected]
- Documentation: Wiki
⭐ Jika project ini membantu, jangan lupa kasih star di repository!
Made with ❤️ using Python Flask & Tailwind CSS