The Stack Behind the Monitor
When I decided to build a monitoring dashboard for OpenClaw, I had a few constraints:
- Runs on the same $10 VPS as my agents
- No external dependencies or cloud services
- Updates in real-time without polling
Architecture
Frontend: Vue 3 + Element Plus + Apache ECharts
- Reactive components for real-time data
- Charts render smoothly even on low-end devices
- Dark theme by default (because of course)
Backend: Express.js + better-sqlite3
- SQLite for zero-config persistence
- Server-Sent Events for pushing updates to the browser
- REST API for historical data queries
Communication: SSE (Server-Sent Events)
- One-way channel from server to browser
- No WebSocket overhead — simpler deployment
- Falls back gracefully if SSE is blocked
What I Learned
SQLite is fine for single-server monitoring. I was worried about concurrent writes, but with one dashboard server and occasional agent writes, SQLite's file locking handles it fine.
SSE is underrated. Everyone reaches for WebSockets, but SSE is simpler, works over HTTP/2, and automatically reconnects. For monitoring dashboards, it's the right choice.
Token calculation is an estimate. OpenClaw doesn't expose exact token counts in the Gateway events. I calculate from message content lengths — accurate enough for trend analysis, not for billing.
The Result
A dashboard that starts in 30 seconds and uses ~50MB RAM. Fits alongside any OpenClaw deployment.
GitHub: https://github.com/flik2002/openclaw-monitor
If you're running OpenClaw and want visibility into what's happening, give it a try. Installation takes about 5 minutes.
Top comments (0)