A self-hosted, Grafana-inspired monitoring solution without Docker. Monitor multiple servers with a beautiful UI, real-time metrics, and intelligent alerts.
- π Grafana-like UI: Modern dark theme with drag & drop panels
- π₯οΈ Multi-Server Monitoring: Monitor unlimited remote servers
- π Smart Alerts: CPU, Memory, Disk, Temperature alerts via Discord/Telegram
- π Real-time Metrics: Live updates via WebSocket
- π₯ Multi-User System: Separate dashboards per user with login
- π¨ Customizable: Drag, resize, and arrange panels freely
- πΎ Persistent Storage: Save your dashboard layouts
| Metric | Details | Unit |
|---|---|---|
| CPU | Overall usage, per-core | Percentage |
| Memory | RAM usage, swap | Percentage |
| Disk | Usage per mount | Percentage, GB |
| Network | In/out traffic | MB/s |
| Temperature | CPU temperature | Β°C |
| System | Uptime, load average | - |
| Processes | Top processes by CPU/memory | - |
- Discord webhooks
- Telegram bot
- In-app notifications
- Browser push notifications
- Requirements
- Quick Start
- Detailed Installation
- Configuration
- Adding Remote Servers
- Alert Setup
- Usage Guide
- API Reference
- Troubleshooting
- Contributing
- License
| Requirement | Minimum | Recommended |
|---|---|---|
| OS | Linux/macOS/Windows | Linux (Ubuntu 20.04+) |
| Python | 3.8 | 3.10+ |
| RAM | 256 MB | 512 MB |
| Disk | 100 MB | 1 GB |
| Network | Port 5000 | - |
| Requirement | Minimum | Recommended |
|---|---|---|
| OS | Linux/macOS/Windows | Linux |
| Python | 3.6 | 3.8+ |
| RAM | 50 MB | 100 MB |
| Network | Port 5001 | - |
curl -sSL https://raw.githubusercontent.com/yourusername/monitoring-dashboard/main/scripts/install.sh | bashgit clone https://github.com/Yuray-Dev/Monitra.git
cd monitoring-dashboardmkdir -p backend frontend/css frontend/js database agentscd backend
pip install -r requirements.txtcp .env.example .env
# Edit .env with your settings
nano .envchmod +x start.sh
./start.shhttp://localhost:5000
Default login: admin / admin
Create all required files from the src directory:
monitra/
βββ start.sh
βββ start.bat
βββ backend/
β βββ app.py
β βββ config.py
β βββ requirements.txt
β βββ .env.example
βββ frontend/
β βββ index.html
β βββ dashboard.html
β βββ css/
β β βββ style.css
β βββ js/
β βββ dashboard.js
β βββ drag-drop.js
β βββ alerts.js
βββ database/
β βββ README.md
βββ agents/
βββ monitoring-agent.py
# Create virtual environment
python3 -m venv venv
# Activate it
source venv/bin/activate # Linux/macOS
# venv\Scripts\activate # Windows
# Install dependencies
cd backend
pip install -r requirements.txtThe database will be created automatically on first run. To manually initialize:
cd backend
pythonfrom app import app, db
with app.app_context():
db.create_all()
print("Database created successfully!")
exit()# Flask Security - CHANGE THIS!
SECRET_KEY=your-very-long-and-secure-random-key-here
# Discord Webhook (optional)
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/123456789/abc123def456
# Telegram Bot (optional)
TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrsTUVwxyz
TELEGRAM_CHAT_ID=123456789
# Alert Thresholds (%)
CPU_THRESHOLD=80
MEMORY_THRESHOLD=85
DISK_THRESHOLD=90
TEMP_THRESHOLD=75
# Update Intervals (seconds)
METRICS_INTERVAL=5
METRICS_RETENTION=24 # hours
# Security (for HTTPS)
SESSION_COOKIE_SECURE=False # Set to True in production with HTTPS
REMEMBER_COOKIE_SECURE=False# Copy agent to server
scp agents/monitoring-agent.py user@remote-server:/tmp/
# SSH into server
ssh user@remote-server
# Install Python and dependencies
sudo apt update
sudo apt install -y python3 python3-pip
pip3 install flask psutil
# Setup agent
sudo mkdir -p /opt/monitoring-agent
sudo cp /tmp/monitoring-agent.py /opt/monitoring-agent/
cd /opt/monitoring-agent
# Create systemd service
sudo tee /etc/systemd/system/monitoring-agent.service << EOF
[Unit]
Description=Monitoring Agent
After=network.target
[Service]
Type=simple
User=nobody
WorkingDirectory=/opt/monitoring-agent
Environment="MONITORING_API_KEY=your-secure-api-key"
ExecStart=/usr/bin/python3 /opt/monitoring-agent/monitoring-agent.py --port 5001
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
# Start agent
sudo systemctl daemon-reload
sudo systemctl enable monitoring-agent
sudo systemctl start monitoring-agent
sudo systemctl status monitoring-agent# Download Python from python.org
# Install Python with "Add to PATH" option
# Copy agent to server
copy monitoring-agent.py C:\Monitoring-Agent\
# Create scheduled task
schtasks /create /tn "MonitoringAgent" /tr "C:\Python39\python.exe C:\Monitoring-Agent\monitoring-agent.py" /sc onstart /ru SYSTEM
# Start agent
python C:\Monitoring-Agent\monitoring-agent.py- Login to the dashboard
- Click β next to "Servers" in the sidebar
- Fill in the details:
- Name: Friendly name (e.g., "Production Web Server")
- Host: IP address or hostname
- Port: 5001 (or custom port)
- API Key: The key you set on the agent
- Click HinzufΓΌgen
-
Create Discord Webhook:
- Open Discord Server Settings
- Go to Integrations β Webhooks
- Click "New Webhook"
- Name it "Monitoring Alerts"
- Copy the Webhook URL
-
Add to .env:
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/123456789/abc123def456
-
Create Bot:
- Message @BotFather on Telegram
- Send
/newbotand follow instructions - Copy the bot token
-
Get Chat ID:
- Start a chat with your bot
- Send any message
- Visit:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates - Copy the
chat_idfrom response
-
Add to .env:
TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrsTUVwxyz TELEGRAM_CHAT_ID=123456789
- Login with admin/admin
- Add your first server (see above)
- Arrange panels by dragging them from the library
- Resize panels using the expand button (β€’)
- Save your layout with the "Speichern" button
| Panel | Icon | Description |
|---|---|---|
| CPU | π₯οΈ | Overall CPU usage and per-core breakdown |
| Memory | πΎ | RAM and swap utilization |
| Disk | π½ | Disk space usage per mount point |
| Network | π | Incoming/outgoing network traffic |
| Temperature | π‘οΈ | CPU temperature sensor data |
- View Alerts: Check the alerts panel in sidebar
- Dismiss: Click β on individual alerts
- Severity Levels:
- π΄ Critical - Immediate action needed
- π‘ Warning - Investigate soon
- π΅ Info - Informational only
Add new user:
- Logout
- Click "Registrieren" tab
- Fill in username and password
- Login with new credentials
Each user has:
- Private dashboard layout
- Own server list
- Personal alert history
All API endpoints (except login/register) require authentication via session cookie.
Get current user info
curl -b cookies.txt http://localhost:5000/api/userList all servers
curl -b cookies.txt http://localhost:5000/api/serversAdd a new server
curl -b cookies.txt -X POST -H "Content-Type: application/json" \
-d '{"name":"Web Server","host":"192.168.1.100","port":5001,"api_key":"secret"}' \
http://localhost:5000/api/serversGet metrics for a server
curl -b cookies.txt http://localhost:5000/api/metrics/1Get recent alerts
curl -b cookies.txt http://localhost:5000/api/alertsSave dashboard layout
curl -b cookies.txt -X PUT -H "Content-Type: application/json" \
-d '{"layout":{},"panels":[]}' \
http://localhost:5000/api/dashboard| Event | Direction | Description |
|---|---|---|
metrics_update |
Server β Client | New metrics data |
new_alert |
Server β Client | New alert triggered |
server_error |
Server β Client | Server connection error |
# Check Python version
python3 --version
# Check if port is in use
lsof -i :5000 # Linux/macOS
netstat -ano | findstr :5000 # Windows
# Run in debug mode
cd backend
python app.py --debug# Test connection from dashboard server
curl http://remote-server:5001/health
# Check agent status
sudo systemctl status monitoring-agent # Linux
ps aux | grep monitoring-agent # macOS
tasklist | findstr python # Windows
# Check firewall
sudo ufw status # Ubuntu
sudo firewall-cmd --list-all # CentOS# Test agent directly
curl -H "X-API-Key: your-key" http://remote-server:5001/metrics
# Check database
sqlite3 database/monitoring.db "SELECT COUNT(*) FROM metric;"# Test Discord webhook
curl -X POST -H "Content-Type: application/json" \
-d '{"content":"Test Alert"}' \
YOUR_DISCORD_WEBHOOK_URL
# Test Telegram
curl -X POST https://api.telegram.org/botYOUR_TOKEN/sendMessage \
-d "chat_id=YOUR_CHAT_ID&text=Test Alert"Contributions are welcome! Please read our Contributing Guidelines.
# Fork and clone
git clone https://github.com/yourusername/monitoring-dashboard.git
cd monitoring-dashboard
# Install dev dependencies
pip install -r requirements-dev.txt
# Run tests
pytest tests/
# Run linter
flake8 backend/ frontend/js/monitoring-dashboard/
βββ backend/ # Flask backend
β βββ app.py # Main application
β βββ config.py # Configuration
β βββ requirements.txt
βββ frontend/ # Web frontend
β βββ index.html # Login page
β βββ dashboard.html # Main dashboard
β βββ css/ # Stylesheets
β βββ js/ # JavaScript files
βββ agents/ # Remote monitoring agents
βββ database/ # SQLite database
βββ tests/ # Unit tests
βββ docs/ # Documentation
βββ scripts/ # Utility scripts
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 [Your Name]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files...
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Wiki: Project Wiki
- Prometheus integration
- Mobile app
- Email alerts
- Custom plugins
- Team sharing
- SSL/TLS support
- Backup/Restore functionality
- API rate limiting
- Grafana dashboard import
Made with β€οΈ for the open-source community