# 🐾 OC Monitor β€” OpenClaw Mission Control Real-time monitoring dashboard for [OpenClaw](https://github.com/openclaw/openclaw) multi-node deployments. ![Dashboard](https://img.shields.io/badge/status-active-brightgreen) ![License](https://img.shields.io/badge/license-MIT-blue) ## ✨ Features - **Real-time metrics** β€” CPU / Memory / Disk / Swap with live jitter animation (10s refresh) - **Provider health checks** β€” Auto-detect all configured AI providers, latency monitoring - **Default model detection** β€” Auto-identifies most-used provider per node (green dot indicator) - **Request logging** β€” Track API calls across all nodes with filtering by node / provider / result - **Multi-node support** β€” Lightweight bash+python agent, works on macOS & Linux - **Dark / Light theme** β€” Toggle with localStorage persistence - **WebSocket push** β€” Instant updates, no polling - **Admin panel** β€” Node management, token display, one-click agent install command generator - **Docker deployment** β€” Single container, SQLite storage ## πŸš€ Quick Start ### 1. Deploy Server (Docker) ```bash curl -fsSL https://cdn.jsdelivr.net/gh/xmg0828888/oc-monitor/install.sh | bash ``` This will: - Pull the repo and build the Docker image - Generate a random auth token - Start the container on port **3800** - Print the dashboard URL and token ### 2. Install Agent on Each Node After server is running, install the agent on each OpenClaw node: ```bash curl -fsSL https://cdn.jsdelivr.net/gh/xmg0828888/oc-monitor/install-agent.sh | bash -s -- \ -s http://YOUR_SERVER_IP:3800 \ -t YOUR_AUTH_TOKEN \ -n "Node Name" ``` The agent auto-detects: - OpenClaw config, providers, and models - System metrics (CPU, memory, disk, swap) - Gateway & daemon status - Session count and token usage - Default/most-used provider ### 3. Open Dashboard Visit `http://YOUR_SERVER_IP:3800` in your browser. ## πŸ“ Architecture ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Node Agent β”‚ β”‚ Node Agent β”‚ β”‚ Node Agent β”‚ β”‚ (bash+py) β”‚ β”‚ (bash+py) β”‚ β”‚ (bash+py) β”‚ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ HTTP POST β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ OC Monitor β”‚ β”‚ Server β”‚ β”‚ (Node.js+SQLiteβ”‚ β”‚ +WebSocket) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ WS push β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Browser β”‚ β”‚ Dashboard β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` ## πŸ”§ Configuration | Env Variable | Default | Description | |---|---|---| | `PORT` | `3800` | Server listen port | | `AUTH_TOKEN` | (required) | Bearer token for API auth | ## πŸ“‹ API Endpoints | Method | Path | Description | |---|---|---| | GET | `/api/dashboard` | Full dashboard data | | POST | `/api/heartbeat` | Agent heartbeat report | | POST | `/api/request` | API request log (single or batch) | | POST | `/api/rename` | Rename a node | | DELETE | `/api/node/:id` | Remove a node | All POST/DELETE endpoints require `Authorization: Bearer ` header. ## License MIT