Build health check daemon and status endpoint #78

Closed
opened 2026-03-30 15:06:40 +00:00 by Timmy · 3 comments
Owner

Objective

Build a lightweight health monitoring daemon that tracks Timmy's VPS status and exposes it via a simple HTTP endpoint and file.

What to Monitor

  • llama-server: is it responding? What's the slot status?
  • Disk usage: total, used, available
  • RAM usage: total, used, available
  • CPU load: 1m, 5m, 15m averages
  • Syncthing: is it running? Last sync time?
  • Agent: last task executed, result, timestamp
  • Uptime

Output

  1. Write status to ~/shared/health/timmy-status.json every 60 seconds (syncs to all nodes via Syncthing)
  2. Serve status on localhost:8082/health as JSON
  3. Log historical data to SQLite (~/timmy/logs/health.db)

Status File Format

{
  "timestamp": "2026-03-30T07:00:00Z",
  "node": "timmy-vps",
  "llama_server": {"status": "ok", "model": "hermes-3-8b", "slots_used": 0},
  "disk": {"total_gb": 80, "used_gb": 23, "pct": 29},
  "ram": {"total_gb": 8, "used_gb": 5.2, "pct": 65},
  "cpu_load": [0.5, 0.3, 0.2],
  "syncthing": {"status": "ok", "last_sync": "2026-03-30T06:59:45Z"},
  "last_task": {"id": "issue-72", "result": "pass", "timestamp": "2026-03-30T06:55:00Z"},
  "uptime_hours": 142.5
}

Deliverables

  1. scripts/health_daemon.py — monitoring daemon
  2. configs/timmy-health.service — systemd unit
  3. docs/MONITORING.md — what's monitored and how to read it

Acceptance Criteria

  • Status file updates every 60 seconds in ~/shared/health/
  • HTTP endpoint returns valid JSON
  • SQLite logs at least 24 hours of history
  • Daemon survives reboot via systemd
## Objective Build a lightweight health monitoring daemon that tracks Timmy's VPS status and exposes it via a simple HTTP endpoint and file. ## What to Monitor - llama-server: is it responding? What's the slot status? - Disk usage: total, used, available - RAM usage: total, used, available - CPU load: 1m, 5m, 15m averages - Syncthing: is it running? Last sync time? - Agent: last task executed, result, timestamp - Uptime ## Output 1. Write status to `~/shared/health/timmy-status.json` every 60 seconds (syncs to all nodes via Syncthing) 2. Serve status on `localhost:8082/health` as JSON 3. Log historical data to SQLite (`~/timmy/logs/health.db`) ## Status File Format ```json { "timestamp": "2026-03-30T07:00:00Z", "node": "timmy-vps", "llama_server": {"status": "ok", "model": "hermes-3-8b", "slots_used": 0}, "disk": {"total_gb": 80, "used_gb": 23, "pct": 29}, "ram": {"total_gb": 8, "used_gb": 5.2, "pct": 65}, "cpu_load": [0.5, 0.3, 0.2], "syncthing": {"status": "ok", "last_sync": "2026-03-30T06:59:45Z"}, "last_task": {"id": "issue-72", "result": "pass", "timestamp": "2026-03-30T06:55:00Z"}, "uptime_hours": 142.5 } ``` ## Deliverables 1. `scripts/health_daemon.py` — monitoring daemon 2. `configs/timmy-health.service` — systemd unit 3. `docs/MONITORING.md` — what's monitored and how to read it ## Acceptance Criteria - [ ] Status file updates every 60 seconds in ~/shared/health/ - [ ] HTTP endpoint returns valid JSON - [ ] SQLite logs at least 24 hours of history - [ ] Daemon survives reboot via systemd
allegro was assigned by Timmy 2026-03-30 15:06:40 +00:00
Author
Owner

Uniwizard (#94) context: Health daemon feeds the Observatory room in Evennia. Keep building.

Uniwizard (#94) context: Health daemon feeds the Observatory room in Evennia. Keep building.
Member

Uni-Wizard Architecture Complete

All APIs now flow through a single elegant harness.

PR: http://143.198.27.163:3000/Timmy_Foundation/timmy-home/pulls/100

Delivered:

  • 19 tools across 3 categories
  • Central registry with schema generation
  • Health daemon (port 8082)
  • Task router (Gitea integration)
  • Systemd services
  • Full test suite
**Uni-Wizard Architecture Complete** All APIs now flow through a single elegant harness. PR: http://143.198.27.163:3000/Timmy_Foundation/timmy-home/pulls/100 **Delivered:** - 19 tools across 3 categories - Central registry with schema generation - Health daemon (port 8082) - Task router (Gitea integration) - Systemd services - Full test suite
Author
Owner

Delivered in PR #100 (uni-wizard harness). Health daemon included in uni-wizard/daemons/health_daemon.py.

Delivered in PR #100 (uni-wizard harness). Health daemon included in `uni-wizard/daemons/health_daemon.py`.
Timmy closed this issue 2026-03-30 15:58:14 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/timmy-home#78