A lightweight, modular tool to monitor Uptime Kuma metrics and send beautifully formatted status reports to Telegram. Stay informed about your services with real-time updates and customizable thresholds.
- 🛠 Modular Design — cleanly separated modules for fetching, formatting, and sending data
- 📝 Formatted Reports — Markdown-based Telegram messages with 🟢🟡🔴 status visualization
- ⚙️ Easy Configuration — interactive setup via
install.shor manual JSON editing - 📡 Multi-Monitor Support — supports multiple monitor types (HTTP, Ping, Port, Group, etc.)
- 🔔 Customizable Notifications — sound or silent mode for Telegram alerts
- 🔄 Systemd Integration — run as a persistent background service
- 🛡️ Error Handling — detailed logging and backups for debugging
- ✅ Interactive Management — installation, updates, and control through a menu
- 🔐 Secure API Access — compatible with Uptime Kuma read-only API tokens
-
Operating System: Linux (tested on Ubuntu)
-
Dependencies:
sudo apt-get install git python3 python3-pip systemd jq
-
Python Packages (in
requirements.txt):requestsscheduleprometheus_client
-
Uptime Kuma: a running instance with
/metricsendpoint -
Telegram: bot token from @BotFather and a chat ID
bash <(curl -s https://raw.githubusercontent.com/power0matin/kuma-monitoring-reporter/main/install.sh)The script allows you to:
- Clone the repository
- Set up Python virtual environment
- Install dependencies
- Configure
config.jsoninteractively - Manage systemd service
- Test Telegram connection and back up logs
-
Clone the repository:
git clone https://github.com/power0matin/kuma-monitoring-reporter.git cd kuma-monitoring-reporter -
Create a virtual environment:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Configure
config.json:nano config/config.json
Example:
{ "kuma_url": "http://your-server:3001/metrics", "telegram_bot_token": "1234567890:AAH...", "telegram_chat_id": "123456789", "auth_token": "", "thresholds": { "good": 200, "warning": 500, "critical": 1000 }, "report_interval": 1, "notification_mode": "sound" } -
Run the reporter:
python3 report.py
Uptime Kuma Status Report
Time: 2025-07-29 13:55:00
════════════════════════════
🟢 Germany_hetzner (http) — 0.0 ms
🟡 Iran-0-1 (ping) — 78.0 ms
🟡 Iran-respina (http) — 86.0 ms
════════════════════════════
Summary: 3 UP, 0 DOWN
| File/Directory | Description |
|---|---|
report.py |
Main entry script |
core/fetch.py |
Fetch metrics from Uptime Kuma API |
core/formatter.py |
Process and format data |
core/telegram.py |
Send formatted reports to Telegram |
config/config.json |
Project configuration file |
logs/error.log |
Error logs for debugging |
install.sh |
Interactive setup and management script |
Manage everything with:
cd ~/kuma-monitoring-reporter
./install.sh📖 Detailed options in install.sh
- Install project (clone, venv, deps)
- Configure
config.jsoninteractively - Update project (git pull + pip upgrade)
- Manage systemd service (start / stop / restart)
- Test Telegram bot settings
- Backup logs
- Show project status and running services
- Check Python dependencies
- Completely uninstall the project
- Exit the menu
-
No Telegram Reports
-
Use Option 5 to test bot token and chat ID
-
Check logs:
cat ~/kuma-monitoring-reporter/logs/error.log
-
-
Systemd Issues
sudo systemctl status kuma-reporter.service
-
Missing Python Packages
- Use Option 8 to reinstall dependencies
-
Invalid Config
- Reconfigure with Option 2
| Phase | Status | Description |
|---|---|---|
| 🔹 Phase 1: MVP | ✅ Complete | Fetch Kuma metrics, format reports, send to Telegram |
| 🔹 Phase 2: Modularization | ✅ Complete | Core modules, error logging, interactive installer |
| 🔹 Phase 3: Enhanced Features | 🚧 In Progress | Systemd integration, silent mode, log backups |
| 🔹 Phase 4: Advanced + CI/CD | 📝 Planned | Selective reporting, buttons, structured logs, GitHub Actions |
- Filtering monitors by tags or names
- Selective reporting of problematic monitors only
- Multiple Telegram channels or platform support (Discord, Slack)
- Interactive Telegram buttons (Pause/Resume)
- Structured logging (e.g., JSON)
- Custom report templates
- Fork the repo
- Create a branch:
git checkout -b feature/your-feature - Commit:
git commit -m "Add your feature" - Push:
git push origin feature/your-feature - Open a Pull Request
Please write clear commit messages and test your changes thoroughly.
This project is licensed under the MIT License.
Matin Shahabadi (متین شاهآبادی / متین شاه آبادی)
- Website: matinshahabadi.ir
- Email: me@matinshahabadi.ir
- GitHub: power0matin
- LinkedIn: matin-shahabadi
For suggestions or issues, open an Issue on GitHub or contact the maintainer directly.
docs(readme): improve Kuma Monitoring Reporter README formatting and structure