Add git-based auto-update for Linux deployment
- install.sh now clones from git instead of copying files - Service runs git pull on restart for automatic updates - Support config.local.json for production settings (gitignored) - kao.py prefers config.local.json when present To update production: push changes, then 'sudo systemctl restart kao' Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
82
README.md
82
README.md
@@ -2,12 +2,17 @@
|
||||
|
||||
A minimalist system status monitor that uses ASCII emotes to display server health on an old phone.
|
||||
|
||||
-brightgreen)
|
||||
-brightgreen>)
|
||||
|
||||
## Why?
|
||||
|
||||
Turn an old phone (with its OLED screen) into a glanceable ambient display for your home server. Instead of graphs and numbers, see a happy face `( ^_^)` when things are good, and a worried face `( o_o)` when they're not.
|
||||
|
||||
## TODO
|
||||
|
||||
- Figure out way to update installation in /opt/kao when git updates. Maybe run a git pull on service startup?
|
||||
- Think about ways of implementing noises.
|
||||
|
||||
## Features
|
||||
|
||||
- **OLED-optimized** — Pure black background, saves battery
|
||||
@@ -34,24 +39,24 @@ Open http://localhost:5100 on your phone (use Fully Kiosk Browser for best resul
|
||||
|
||||
## Status Faces
|
||||
|
||||
| State | Emote | Meaning |
|
||||
|-------|-------|---------|
|
||||
| Optimal | `( ^_^)` | All systems healthy |
|
||||
| Warning | `( o_o)` | Something needs attention |
|
||||
| Critical | `( x_x)` | Immediate action required |
|
||||
| Notify | `( 'o')` | Transient notification |
|
||||
| Sleeping | `( -_-)zzZ` | Sleep mode active |
|
||||
| Disconnected | `( ?.?)` | Can't reach server |
|
||||
| State | Emote | Meaning |
|
||||
| ------------ | ----------- | ------------------------- |
|
||||
| Optimal | `( ^_^)` | All systems healthy |
|
||||
| Warning | `( o_o)` | Something needs attention |
|
||||
| Critical | `( x_x)` | Immediate action required |
|
||||
| Notify | `( 'o')` | Transient notification |
|
||||
| Sleeping | `( -_-)zzZ` | Sleep mode active |
|
||||
| Disconnected | `( ?.?)` | Can't reach server |
|
||||
|
||||
## Built-in Detectors
|
||||
|
||||
| Detector | Monitors |
|
||||
|----------|----------|
|
||||
| **disk_space** | Disk usage on all drives |
|
||||
| **cpu** | CPU utilization |
|
||||
| **memory** | RAM usage |
|
||||
| **service** | Whether processes are running |
|
||||
| **network** | Host reachability (ping) |
|
||||
| Detector | Monitors |
|
||||
| -------------- | ----------------------------- |
|
||||
| **disk_space** | Disk usage on all drives |
|
||||
| **cpu** | CPU utilization |
|
||||
| **memory** | RAM usage |
|
||||
| **service** | Whether processes are running |
|
||||
| **network** | Host reachability (ping) |
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -59,19 +64,19 @@ Edit `config.json` to enable/disable detectors and set thresholds:
|
||||
|
||||
```json
|
||||
{
|
||||
"aggregator_url": "http://localhost:5100",
|
||||
"detectors": [
|
||||
{
|
||||
"name": "disk_space",
|
||||
"enabled": true,
|
||||
"script": "detectors/disk_space.py",
|
||||
"env": {
|
||||
"CHECK_INTERVAL": "300",
|
||||
"THRESHOLD_WARNING": "85",
|
||||
"THRESHOLD_CRITICAL": "95"
|
||||
}
|
||||
}
|
||||
]
|
||||
"aggregator_url": "http://localhost:5100",
|
||||
"detectors": [
|
||||
{
|
||||
"name": "disk_space",
|
||||
"enabled": true,
|
||||
"script": "detectors/disk_space.py",
|
||||
"env": {
|
||||
"CHECK_INTERVAL": "300",
|
||||
"THRESHOLD_WARNING": "85",
|
||||
"THRESHOLD_CRITICAL": "95"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
@@ -91,6 +96,7 @@ curl -X POST http://localhost:5100/event \
|
||||
- `ttl` — Auto-expire after N seconds (for heartbeat pattern)
|
||||
|
||||
Clear an event:
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:5100/clear \
|
||||
-d '{"id": "my_check"}'
|
||||
@@ -131,15 +137,15 @@ automation:
|
||||
|
||||
## API Reference
|
||||
|
||||
| Endpoint | Method | Description |
|
||||
|----------|--------|-------------|
|
||||
| `/` | GET | Web UI |
|
||||
| `/status` | GET | Current state as JSON |
|
||||
| `/events` | GET | List all active events |
|
||||
| `/event` | POST | Register an event |
|
||||
| `/clear` | POST | Clear an event by ID |
|
||||
| `/sleep` | POST | Enter sleep mode |
|
||||
| `/wake` | POST | Exit sleep mode |
|
||||
| Endpoint | Method | Description |
|
||||
| --------- | ------ | ---------------------- |
|
||||
| `/` | GET | Web UI |
|
||||
| `/status` | GET | Current state as JSON |
|
||||
| `/events` | GET | List all active events |
|
||||
| `/event` | POST | Register an event |
|
||||
| `/clear` | POST | Clear an event by ID |
|
||||
| `/sleep` | POST | Enter sleep mode |
|
||||
| `/wake` | POST | Exit sleep mode |
|
||||
|
||||
## Personality
|
||||
|
||||
|
||||
Reference in New Issue
Block a user