DocHub
API endpoints, dashboard layout, warning indicators, and Anthropic API integration

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

  1. Header — Title, last update time, refresh countdown bar
  2. Host bar — CPU, memory, disk (/), disk (/data), fail2ban banned count
  3. Services row — Green/red dots for nginx, claude-net-tunnel, fail2ban
  4. Tab bar — One tab per container with pulsing warning indicators
  5. Container panel — Full-width detail view for the selected container
  6. 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:

  1. Be invited to the Omelas AI LLC org
  2. Run claude logout then claude login on their container
  3. Select “Omelas AI LLC” during login

Currently only Chas is a member. Sean and Jaz need inviting.

Remaining Setup

  1. Cloudflare Access: Enable orange-cloud proxy on admin.ipnoelp.io, add @omelasai.com access policy
  2. Team onboarding: Invite Sean + Jaz to Anthropic org
  3. API integration: Wire Analytics API into slow collector (replace JSONL parsing with real USD costs)
  4. Phase 2: Telegram alerts via @chasombot (container down, tmux dead, disk full)