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
Installation
macOS (Homebrew)
brew tap collynes/glancewatch
brew install glancewatch
glancewatch
Windows (Chocolatey)
choco install glancewatch
glancewatch
Node.js/npm (All platforms)
# Global installation
npm install -g glancewatch
glancewatch
# Or use npx
npx glancewatch
Python/pip (All platforms)
pip install glancewatch
glancewatch
Quick Start
Background Service (Recommended for Production)
Linux/Ubuntu (systemd):
# One-command install as background service
curl -sSL https://raw.githubusercontent.com/collynes/glancewatch/main/scripts/install-pip.sh | bash
# Service automatically starts on boot and runs in background
Simple background start (nohup):
# Start in background
nohup glancewatch > /dev/null 2>&1 &
# Check if running
ps aux | grep glancewatch
See docs/BACKGROUND-SERVICE.md for complete guide including screen/tmux options.
Foreground (Development)
pip install glancewatch
glancewatch
# Or run with custom port
glancewatch --port 8080
# Access the dashboard
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
📚 Documentation
- Installation Guide - Detailed installation instructions
- Quick Start Guide - Get started in minutes
- Ubuntu Quick Start - Ubuntu-specific guide
- Background Service Setup - Run as a service
- UI Guide - Web interface overview
- Pip Installation - Python package details
- Release Notes - All version history
📡 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 /docs- 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.
🧪 Testing & Development
GlanceWatch has comprehensive test coverage to ensure reliability:
Running Tests
# Install development dependencies
pip install -e ".[dev]"
# Run all tests
pytest tests/ -v
# Run with coverage report
pytest tests/ --cov=app --cov-report=html
# Run specific test file
pytest tests/test_api.py -v
# Run and stop on first failure
pytest tests/ -x
Test Coverage
- 78%+ code coverage with 63+ test cases
- All endpoints tested (including new
/thresholdsendpoints) - CLI functionality tests
- Error handling and edge cases
- Integration workflow tests
CI/CD
Every push and pull request automatically runs:
- ✅ Tests on Python 3.8, 3.9, 3.10, 3.11, 3.12
- ✅ Code linting
- ✅ Coverage checks (minimum 75%)
- ✅ Package build verification
See docs/TEST_SUMMARY.md for detailed test documentation.
🆕 What's New in v1.2.1
- ✅ Dynamic Version Display: Fixed version display bug - now shows correct version in UI
- ✅ Template-based Version: Uses {{VERSION}} placeholder replaced at runtime
- ✅ Improved UI: Green/red circle status indicators with thin borders
- ✅ System Health Monitor: Added uptime, load average, and network statistics
- ✅ Better Thresholds: CPU now supports 0.1% minimum threshold
- ✅ Reset Defaults: Reset button always enabled with proper default values (80/80/85)
- ✅ Clean Documentation: Removed all unsolicited emojis from docs
- ✅ Section Reordering: Moved threshold configuration before system health
See docs/RELEASE_NOTES_v1.2.1.md for complete release notes.
📄 License
MIT License - see LICENSE file for details.
📧 Support
- Issues: GitHub Issues
- PyPI: pypi.org/project/glancewatch
Made with ❤️ for simple system monitoring
Metadata
Release files for glancewatch 1.2.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| glancewatch-1.2.9.tar.gz | 615.1 kB | Without provenance | Details for glancewatch-1.2.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| glancewatch-1.2.9-py3-none-any.whl | Python 3 | none | any | Details for glancewatch-1.2.9-py3-none-any.whl |
Total release size: 1.2 MB
Release files / glancewatch-1.2.9.tar.gz
| Download URL | glancewatch-1.2.9.tar.gz |
|---|---|
| Size | 615.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ea5bfe3f43429eff4ce576e3016de8185ffadb0d519be5c6e4eeab13f8010c5
|
|
BLAKE2b-256 checksum How to use checksums |
428839a9e432de66a0b7e5eac934d3454218045cfdcf8f80e9b530d839c6fadb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / glancewatch-1.2.9-py3-none-any.whl
| Download URL | glancewatch-1.2.9-py3-none-any.whl |
|---|---|
| Size | 589.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50ec5c5dced607c03971591ff568fa1f8d908cb3492ef614fe3ac057dbd51a82
|
|
BLAKE2b-256 checksum How to use checksums |
80287d8f14c9ba1a0271e410ed51605ea506ed3648dee3c356e3409b94dc8b14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for glancewatch 1.2.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.