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.
For suggestions or issues, open an Issue on GitHub or contact the maintainer directly.
docs(readme): improve Kuma Monitoring Reporter README formatting and structure