docs: update VERSION, HISTORY, FUTURE for v0.0.4 — gateway collector complete
This commit is contained in:
parent
d09822a821
commit
3140dac7cd
15
FUTURE.md
15
FUTURE.md
|
|
@ -3,7 +3,7 @@
|
||||||
**This document tracks potential future enhancements for Mission Control.**
|
**This document tracks potential future enhancements for Mission Control.**
|
||||||
|
|
||||||
**Last Updated:** 2026-05-10
|
**Last Updated:** 2026-05-10
|
||||||
**Current Version:** v0.0.3
|
**Current Version:** v0.0.4
|
||||||
|
|
||||||
## How to Use This Document
|
## How to Use This Document
|
||||||
|
|
||||||
|
|
@ -36,18 +36,11 @@ Items are grouped under their priority section heading (`## 🔴 CRITICAL`, `##
|
||||||
|
|
||||||
### 🟠 Gateway Data Collection Service — HIGH
|
### 🟠 Gateway Data Collection Service — HIGH
|
||||||
**Priority:** HIGH
|
**Priority:** HIGH
|
||||||
**Status:** IN PROGRESS
|
**Status:** DONE ✅
|
||||||
**Added:** 2026-05-10 by Ripley
|
**Added:** 2026-05-10 by Ripley
|
||||||
|
**Completed:** 2026-05-11
|
||||||
|
|
||||||
**Description:**
|
GatewayCollectorService created in `src/backend/app/services/monitoring/`. Background asyncio task polls gateway RPC endpoints (cost, cron, sessions, health) and upserts into monitoring models. Configurable intervals via env vars. Startup/shutdown integrated into main.py lifespan.
|
||||||
Port the dashboard's Go data collection (`refresh.go`, `refresh_sessions.go`, `refresh_tokens.go`, etc.) to Python services that poll the OpenClaw gateway.
|
|
||||||
|
|
||||||
**Implementation Notes:**
|
|
||||||
- Create `app/services/monitoring/gateway_collector.py`
|
|
||||||
- Reuse existing `gateway_rpc.py` for all RPC calls
|
|
||||||
- Poll: usage.cost, usage.status, cron.list/status, sessions.list/preview, agents.list, health, status
|
|
||||||
- Run as background asyncio task with configurable intervals
|
|
||||||
- Store collected data in new PostgreSQL models
|
|
||||||
|
|
||||||
### 🟠 Monitoring Database Models — HIGH
|
### 🟠 Monitoring Database Models — HIGH
|
||||||
**Priority:** HIGH
|
**Priority:** HIGH
|
||||||
|
|
|
||||||
17
HISTORY.md
17
HISTORY.md
|
|
@ -1,5 +1,22 @@
|
||||||
# Mission Control — Changelog
|
# Mission Control — Changelog
|
||||||
|
|
||||||
|
## v0.0.4
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- **Gateway Data Collection Service** — Background asyncio task that polls gateway RPC endpoints and stores results in monitoring models
|
||||||
|
- `gateway_collector.py` — GatewayCollectorService class with per-endpoint collection methods (cost, cron, session, health)
|
||||||
|
- `models.py` — Pydantic schemas for parsing gateway RPC responses into typed Python objects
|
||||||
|
- `__init__.py` — Package init, exports GatewayCollectorService
|
||||||
|
- **Collector startup/shutdown** — Added to main.py lifespan; launches collector as background task when gateways exist
|
||||||
|
- **Configurable collection intervals** via env vars: COLLECTION_INTERVAL_COST (300s), COLLECTION_INTERVAL_CRON (60s), COLLECTION_INTERVAL_SESSION (30s), COLLECTION_INTERVAL_HEALTH (60s)
|
||||||
|
- **Upsert pattern** — All DB writes use insert-or-update to avoid duplicate records
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Model FK definitions in monitoring.py and alert_rules.py: replaced `Column(UUID, ForeignKey(...))` with `Field(foreign_key=...)` to match codebase pattern
|
||||||
|
- Added missing `gateway_id` field to AlertRule model
|
||||||
|
- Removed OpenClawDBService inheritance from GatewayCollectorService (uses session factory pattern)
|
||||||
|
- Cleaned up duplicate/conflicting imports in collector
|
||||||
|
|
||||||
## v0.0.3
|
## v0.0.3
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
||||||
12
VERSION.md
12
VERSION.md
|
|
@ -1,5 +1,17 @@
|
||||||
# Mission Control — Version History
|
# Mission Control — Version History
|
||||||
|
|
||||||
|
## v0.0.4 — 2026-05-11
|
||||||
|
- **Phase 2: Gateway Data Collection Service**
|
||||||
|
- Created `src/backend/app/services/monitoring/` package with collector, Pydantic models, and init
|
||||||
|
- GatewayCollectorService: background asyncio task polling gateway RPC endpoints
|
||||||
|
- Collection methods: cost (usage.cost + usage.status), cron (cron.list), sessions (sessions.list + preview), health (health + status)
|
||||||
|
- Upsert pattern for all DB writes to avoid duplicates
|
||||||
|
- Configurable intervals via env vars (COST=300s, CRON=60s, SESSION=30s, HEALTH=60s)
|
||||||
|
- Collector startup/shutdown integrated into main.py lifespan
|
||||||
|
- Fixed model FK definitions: replaced Column(UUID, ForeignKey(...)) with Field(foreign_key=...)
|
||||||
|
- Added missing gateway_id field to AlertRule model
|
||||||
|
- Backend builds and runs successfully, collector logs correctly
|
||||||
|
|
||||||
## v0.0.3 — 2026-05-11
|
## v0.0.3 — 2026-05-11
|
||||||
- **Phase 2: Monitoring database models**
|
- **Phase 2: Monitoring database models**
|
||||||
- Add 7 new SQLModel tables for monitoring data collection
|
- Add 7 new SQLModel tables for monitoring data collection
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue