A lightweight server/PC monitoring dashboard with a Flask-based Python backend and a simple HTML/JavaScript frontend. The backend continuously collects system performance metrics and sends automatic email alerts when resource usage exceeds configured thresholds. The frontend periodically fetches and displays the live data.
- 📊 Real-time monitoring of server or PC performance
- 🐍 Python backend using Flask
- 🌐 HTML + JavaScript frontend
- 🔄 Periodic polling from frontend
- 🚨 Automated email alerts for high usage
- 🔐 Environment-based configuration using
.env - 🌐 Generate PDF Rapport by an AI Expert
- CPU usage (%)
- RAM usage (%)
- Disk usage (%)
- System information (OS, uptime, hostname)
project-root/
│
├── DummyServer.py # Flask backend (monitoring + alerts)
├── index.html # Frontend dashboard
├── requirements.txt # Python dependencies
├── package.json # Frontend dependencies
├── package-lock.json
├── .env # Environment variables
├── .gitignore
├── node_modules/
└── README.md
- DummyServer.py continuously collects system metrics using
psutil. - Thresholds are checked for CPU, RAM, and Disk usage.
- If a threshold is exceeded, an email alert is automatically sent.
- The Flask API exposes monitoring data as JSON.
index.htmlfetches the data at a fixed interval and updates the UI.- The user could also generate a pdf rapport about the current situation of the server.
- Python 3.14
- A modern web browser
Installed via:
pip install -r requirements.txtSensitive configuration is stored in a .env file (not committed to version control).
Example .env file:
ALERT_EMAIL="your_alert_email@example.com"
SMTP_SERVER="smtp.example.com"
SMTP_PORT=587
SMTP_USER="smtp_user@example.com"
SMTP_PASSWORD="your_smtp_password"
OPENAI_API_KEY="your_openai_api_key"
OPENAI_URL="https://api.openai.com/v1/chat/completions"ALERT_EMAIL– Email address that receives alert notificationsSMTP_SERVER– SMTP server hostnameSMTP_PORT– SMTP server portSMTP_USER– SMTP authentication usernameSMTP_PASSWORD– SMTP authentication passwordOPENAI_API_KEY– API key for OpenAI (if used for analysis or summaries)OPENAI_URL– OpenAI API endpoint
python DummyServer.pyThe backend will start a Flask server (default: http://localhost:5000) and:
- Collect performance metrics
- Monitor threshold limits
- Send email alerts when limits are exceeded
Simply open index.html in your browser.
python -m http.server 8000Then visit:
http://localhost:8000/index.html
-
CPU, RAM, and Disk usage are checked at regular intervals
-
If usage exceeds the configured threshold:
- An alert email is sent automatically
- Never commit
.envfiles - Restrict API access in production
- Use HTTPS when monitoring remote servers
- Consider authentication for public deployments
- WebSocket-based real-time updates
- Alert cooldown configuration
- Alert history logging
- Grafana / Prometheus integration
- Docker support
This project is intended for learning, internal monitoring, and small-scale deployments.
You are free to modify and extend it for your own use.