API & Dashboard UI
API Endpoints
| Endpoint | Description |
|---|---|
GET / |
Dashboard HTML page |
GET /api/status |
Merged fast + slow JSON (all metrics) |
GET /api/logs/:container |
Last 100 entries of latest session log |
GET /api/logs/:container/list |
List session log files |
GET /api/fail2ban |
Detailed ban list with IPs |
Container names are validated against an allowlist to prevent path traversal attacks.
Dashboard Layout
Single page, dark theme, auto-refreshes every 30 seconds.
Structure
- Header — Title, last update time, refresh countdown bar
- Host bar — CPU, memory, disk (/), disk (/data), fail2ban banned count
- Services row — Green/red dots for nginx, claude-net-tunnel, fail2ban
- Tab bar — One tab per container with pulsing warning indicators
- Container panel — Full-width detail view for the selected container
- Fail2ban section — Collapsible, click to expand/collapse IP list
Tab Warning Indicators
Each tab shows a pulsing dot reflecting the worst condition:
| Condition | Level |
|---|---|
| Container stopped | Critical (red) |
| Claude running but tmux gone | Critical (red) |
| tmux not running (active container only) | Warning (yellow) |
| CPU load > 4 | Critical (red) |
| CPU load > 2 | Warning (yellow) |
| Memory > 95% | Critical (red) |
| Memory > 80% | Warning (yellow) |
| Disk > 50 GB | Critical (red) |
| Snapshot older than 24 hours | Warning (yellow) |
| Idle container (no activity) | Green (no false alarms) |
Container Panel Contents
- Status badges: Claude Running/No Claude, tmux Active/Dead/Idle, Docker count, Session LIVE
- Warning banner: Lists any active warnings in yellow
- 6 metric cards: CPU Load, Memory, Uptime, Network, Disk Usage, Snapshot
- Today’s Usage: Output tokens vs daily limit progress bar (always visible)
- Docker containers: Table with name, image, status
- Recent Sessions: SSH login history with IP, date, duration
Anthropic Admin API Integration
Status
An Admin API key has been created for the Omelas AI LLC organization. The Claude Code Analytics endpoint provides per-user daily metrics including sessions, lines of code, commits, PRs, per-model tokens, and estimated USD cost.
| Item | Details |
|---|---|
| Org | Omelas AI LLC |
| Org ID | b461a248-a068-474d-9fbc-d906d878b934 |
| API key location | /opt/dashboard/.env on OVH5 |
| Endpoint | GET /v1/organizations/usage_report/claude_code?starting_at=YYYY-MM-DD |
Onboarding Requirements
For the API to return per-user data, team members must:
- Be invited to the Omelas AI LLC org
- Run
claude logoutthenclaude loginon their container - Select “Omelas AI LLC” during login
Currently only Chas is a member. Sean and Jaz need inviting.
Remaining Setup
- Cloudflare Access: Enable orange-cloud proxy on
admin.ipnoelp.io, add @omelasai.com access policy - Team onboarding: Invite Sean + Jaz to Anthropic org
- API integration: Wire Analytics API into slow collector (replace JSONL parsing with real USD costs)
- Phase 2: Telegram alerts via @chasombot (container down, tmux dead, disk full)