mirror of
https://github.com/Heretek-AI/heretek-openclaw-dashboard.git
synced 2026-07-19 22:03:34 -04:00
main
- SEC-002/B6: Added API key authentication middleware - Reads DASHBOARD_API_KEY from env or config - Rejects unauthorized requests with 401 - Can be disabled in dev via DASHBOARD_AUTH_DISABLED=true - SEC-010/B7: Fixed CORS default from true to opt-in only - SEC-003/B10: Deleted stale build artifacts with hardcoded API keys - INT-002: Removed placeholder secrets from .env.local - B5: Replaced 8 TODO stub routes with real API calls - litellm/config: fetches from LITELLM_URL/config - a2a/broadcast: POSTs to GATEWAY_URL/a2a/broadcast - a2a/stream: streams from GATEWAY_URL/a2a/stream - memory/[id]: GET/DELETE from Qdrant - memory/[id]/pin: POST to Qdrant - skills/[id]: DELETE to GATEWAY_URL - agents/[id]: GET/PUT to GATEWAY_URL - agents/[id]/deploy: POST to GATEWAY_URL - Added REMEDIATION_LOG.md documenting all changes See audit/SUBREPO_REVIEW_2026-04-04.md for full details
Heretek OpenClaw Dashboard
Real-time monitoring and observability for the OpenClaw multi-agent collective.
Overview
The Health Dashboard provides comprehensive monitoring for all OpenClaw services including:
- Service Health - Gateway, LiteLLM, PostgreSQL, Redis, Ollama, Langfuse
- Agent Status - Real-time status of all deployed agents
- LiteLLM Metrics - Cost tracking, token usage, latency, budget status
- Langfuse Observability - LLM tracing and analytics
- Resource Monitoring - CPU, memory, disk usage
- A2A Communication - Agent-to-agent message tracking
Quick Start
Prerequisites
- Node.js 18+
- Access to OpenClaw services (Gateway, LiteLLM, etc.)
LITELLM_MASTER_KEYenvironment variable
Installation
git clone https://github.com/heretek/heretek-openclaw-dashboard.git
cd heretek-openclaw-dashboard
npm install
Configuration
- Copy
.env.exampleto.env:
cp .env.example .env
- Update environment variables:
# LiteLLM Configuration
LITELLM_URL=http://localhost:4000
LITELLM_MASTER_KEY=your-master-key-here
# Dashboard Server
DASHBOARD_PORT=18790
DASHBOARD_HOST=0.0.0.0
# Service URLs
GATEWAY_URL=http://localhost:18789
LANGFUSE_URL=http://localhost:3000
Running the Dashboard
# Development
npm run dev
# Production
npm start
Access the dashboard at http://localhost:18790
Components
Service Status
Displays health status for all core services with response times and uptime.
Agent Status
Shows real-time status of all deployed agents with memory usage and last active time.
LiteLLM Metrics
Comprehensive LiteLLM Gateway metrics:
- Total spend (today/week/month)
- Token usage breakdown
- Request latency percentiles (P50, P95, P99)
- Success/failure rates
- Budget alerts
Model Usage
Analytics for LLM model usage:
- Cost breakdown by model
- Token usage statistics
- Active models count
- Usage trends
Budget Status
Budget tracking and alerts:
- Per-key/user budget status
- Utilization percentages
- Warning/critical alerts
- Remaining budget tracking
API Reference
API Endpoints
| Endpoint | Description |
|---|---|
GET /api/health |
Service health check |
GET /api/litellm/health |
LiteLLM health check |
GET /api/litellm/metrics |
Comprehensive metrics data |
GET /api/litellm/spend |
Total spend data |
GET /api/litellm/budgets |
Budget status |
GET /api/agents |
Agent status |
GET /api/services |
Service status |
Configuration
Dashboard Config (config/dashboard-config.yaml)
dashboard:
name: "OpenClaw Health Dashboard"
refresh_interval: 30000 # 30 seconds
server:
port: 18790
host: "0.0.0.0"
litellm:
enabled: true
url: "http://localhost:4000"
collection_interval: 30000
Alert Thresholds
alerts:
thresholds:
budget_warning: 80 # 80% of budget
budget_critical: 100 # 100% of budget
latency_warning: 5000 # 5 seconds
latency_critical: 10000 # 10 seconds
error_rate_warning: 5 # 5%
error_rate_critical: 10 # 10%
Development
Project Structure
dashboard/
├── src/ # Source code
│ ├── api/ # Express API routes
│ ├── collectors/ # Data collectors
│ ├── integrations/ # External integrations
│ └── config/ # Configuration
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # React hooks
│ │ └── styles/ # CSS styles
│ └── index.html
└── README.md
Adding New Components
- Create component in
frontend/src/components/ - Create hook in
frontend/src/hooks/if needed - Add to UI configuration in
dashboard-config.yaml - Register in main app (
frontend/src/app.tsx)
Testing
# Run tests
npm test
# Lint
npm run lint
Troubleshooting
LiteLLM Connection Failed
# Check LiteLLM is running
curl http://localhost:4000/health
# Verify master key
echo $LITELLM_MASTER_KEY
Metrics Not Updating
- Check collector is running:
docker compose ps - Review logs:
docker compose logs dashboard - Verify network connectivity between services
Budget Alerts Not Showing
- Ensure budgets are configured in LiteLLM
- Check
budget_settingsinlitellm_config.yaml - Verify spend data is being collected
Related Repositories
- Core - Gateway and agents
- CLI - Deployment CLI
- Plugins - Plugin system
- Deploy - Infrastructure as Code
- Docs - Documentation site
License
MIT
Support
- Issues: https://github.com/heretek/heretek-openclaw-dashboard/issues
- Discussions: https://github.com/heretek/heretek-openclaw-dashboard/discussions
🦞 The thought that never ends.
Description
Languages
JavaScript
49.3%
TypeScript
46.5%
CSS
3.4%
Dockerfile
0.5%
HTML
0.3%