Skip to content

feat: Service status indicators on fleet overview (GH #254)#256

Open
vivekchand wants to merge 2 commits intomainfrom
fix/gh-clawmetry-254-service-status
Open

feat: Service status indicators on fleet overview (GH #254)#256
vivekchand wants to merge 2 commits intomainfrom
fix/gh-clawmetry-254-service-status

Conversation

@vivekchand
Copy link
Owner

Summary

Adds color-coded service status indicators to the ClawMetry fleet overview page.

What is added

New API endpoint: GET /api/nodes/<node_id>/service-status

  • Returns per-service health for any registered node
  • For the local node: real checks via socket probe (gateway), proc scan (sync daemon), /proc/meminfo + shutil (resources)
  • For remote nodes: reads from latest pushed metrics, falls back to unknown
  • Services covered: Gateway, Sync Daemon, Channels (per channel), System Resources (CPU / memory / disk)

Fleet page UI updates:

  • StatusIndicator dot component: 9px colored dot with pulsing glow
    • Green = healthy, Yellow = degraded, Red = down, Gray = unknown
  • StatusBar row at the bottom of each node card with one dot+label per service
    • Tooltip on hover shows label, detail text, and per-child breakdown (channels, resource sub-items)
  • Drill-down modal on card click:
    • Full per-service breakdown with dot, label, status text, and detail
    • Child rows for Channels (per channel) and Resources (CPU / memory / disk)
    • Closes on overlay click or X button
  • Auto-refresh every 30s (consistent with existing fleet polling interval)

Status levels

Dot color Status Meaning
Green healthy All checks pass
Yellow degraded Degraded or partial
Red down Service not running
Gray unknown No data available

Testing

  1. python dashboard.py
  2. Open http://localhost:8900/fleet
  3. Service status bars appear below each node card; click a card to open drill-down modal

Closes #254

- Add /api/nodes/<node_id>/service-status endpoint with per-service health
- Services tracked: Gateway, Sync Daemon, Channels (per channel), Resources (CPU/mem/disk)
- Status levels: healthy (green), degraded (yellow), down (red), unknown (gray)
- StatusBar component on each node card with tooltip per indicator
- Drill-down modal on card click showing full per-service breakdown with child rows
- Local node: real checks via socket/proc/filesystem; remote nodes: use pushed metrics
- Auto-refresh every 30s (consistent with existing fleet poll interval)
… glance (closes #254)

- Add _detect_channel_status(): reads openclaw.json + session JSONL to find active channels
- Add _get_service_status(): gateway port check, channel list, sync daemon detection, CPU/RAM via psutil, system uptime
- Add GET /api/service-status endpoint (bp_health blueprint)
- Add Service Status and Channels sections to System Health panel (both themes)
- Add loadServiceStatus() JS: renders colored pills for Gateway, Sync, RAM, CPU, uptime; channel pills per configured/active channel
- startSystemHealthRefresh() now calls both loadSystemHealth() and loadServiceStatus()
- 5 new tests in TestServiceStatus, all 81 existing tests pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Service status indicators (gateway, channels, sync health at a glance)

1 participant