Lightweight monitoring adapter bridging Glances metrics with Uptime Kuma
Project description
GlanceWatch 🎯
GlanceWatch is a lightweight monitoring adapter that bridges Glances system metrics with Uptime Kuma and other monitoring tools. It exposes simple HTTP endpoints with configurable thresholds that answer: "Is my system healthy?"
✨ Features
- 🚀 One-Command Install:
pip install glancewatch- everything included - 🔄 Auto-Glances Management: Automatically installs and starts Glances for you
- 🎯 HTTP Status Alerting: Returns HTTP 200 (OK) or 503 (unhealthy) based on thresholds
- 🎨 Router-Style Web UI: Clean admin interface at
/(root) - ⚙️ Configurable Thresholds: Set custom limits for RAM, CPU, and disk usage
- 💾 Persistent Configuration: Changes saved to config.yaml automatically
- 📊 Multiple Disk Monitoring: Monitor all or specific mount points
- 🏥 Health Checks: Built-in health endpoint for service monitoring
- 📝 OpenAPI Docs: Auto-generated API documentation at
/api - 📈 Real-Time Metrics: Auto-refreshing dashboard shows live system status
🚀 Quick Start
# Install GlanceWatch (automatically installs Glances dependency)
pip install glancewatch
# Run GlanceWatch (auto-starts Glances if needed)
glancewatch
# Access the web UI
open http://localhost:8000
That's it! 🎉 GlanceWatch automatically handles Glances installation and startup.
🎯 Usage
# Start GlanceWatch (auto-starts Glances)
glancewatch
# Start without auto-starting Glances
glancewatch --ignore-glances
# Custom port
glancewatch --port 9000
# Custom host
glancewatch --host 0.0.0.0
📡 API Endpoints
GET /- Web UI (root endpoint)GET /status- Combined status (HTTP 503 on threshold violation)GET /ram- RAM usage checkGET /cpu- CPU usage checkGET /disk- Disk usage checkGET /health- Service health checkGET /config- Get configurationPUT /config- Update thresholdsGET /api- Interactive API documentation
🔔 Uptime Kuma Integration
- In Uptime Kuma, create a new HTTP(s) monitor
- Set URL to:
http://your-server:8000/status - Set "Accepted Status Codes" to:
200
When any metric exceeds its threshold, GlanceWatch returns HTTP 503, triggering an alert.
⚙️ Configuration
GlanceWatch creates ~/.config/glancewatch/config.yaml:
glances_base_url: "http://localhost:61208/api/4"
host: "0.0.0.0"
port: 8000
log_level: "INFO"
return_http_on_failure: 503
thresholds:
ram_percent: 80
cpu_percent: 80
disk_percent: 85
disk:
mounts:
- "/"
Adjust thresholds via the Web UI at / or edit the config file.
🆕 What's New in v1.0.1
- ✅ Auto-Glances Management: Glances is now auto-installed and auto-started
- ✅ New CLI Flag:
--ignore-glancesto skip automatic Glances management - ✅ Route Reorganization: API docs moved from
/docsto/api, UI now at root/ - ✅ UI Redesign: Clean router-style admin interface with plain colors
- ✅ Improved UX: Single command to install and run everything
📄 License
MIT License - see LICENSE file for details.
📧 Support
- Issues: GitHub Issues
- PyPI: pypi.org/project/glancewatch
Made with ❤️ for simple system monitoring
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file glancewatch-1.0.1.tar.gz.
File metadata
- Download URL: glancewatch-1.0.1.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a9ba8c013a8e7118847fd8e096890540752c59c3f2e31a3773a170d60a9e67d
|
|
| MD5 |
16ffedab02a0f999649a677678eb5bdb
|
|
| BLAKE2b-256 |
6ffc353e285e9d89d0caed23f53353e2856b574830e14dd41b70bac215b8512e
|
File details
Details for the file glancewatch-1.0.1-py3-none-any.whl.
File metadata
- Download URL: glancewatch-1.0.1-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4156c119c2ed190fff31ad03dce8147135964aef854d388320f209c586d0cbc
|
|
| MD5 |
8f29e0ae12dc05d3d51e8affeac1603c
|
|
| BLAKE2b-256 |
dfc7cc97519f8eafdea5cc55fa879691376d3a01f61db99bda86742214baa587
|