How bekmurodgofurov/gsh works
GSH monitors registered CS2 servers, persists telemetry, classifies anomalies, and presents operational views and controls through a dashboard, AI agent, voice interface, and Telegram alerts. The principal flow is A2S polling → TimescaleDB → ML analysis/incidents → gateway APIs → dashboard or notifications. The README documents several service-to-service links not visible in the sampled excerpts; those links are cited to the README. Internal implementation detail is limited to the gateway agent’s router, tools, and query layer.
Main entry points: gateway-api/main.py Gateway API · views Dashboard views · ingestion-service/main.py Ingestion API · bridge.py Anomaly bridge
Components 25
Collection & storage
- A2S ingestion
ingestion-service/poller.py - Ingestion API
ingestion-service/main.py - Shared schemas
shared_schemas/models.py - TimescaleDB
- Redis stream
ML analysis
- Anomaly bridge
anomaly-detection-ml/bridge.py - Anomaly scoring
anomaly-detection-ml/main.py - Root-cause classifier
root-cause-ml/main.py
Gateway & agent
- Gateway API
gateway-api/main.py - Agent router
gateway-api/app/agent/router.py - Agent tools
gateway-api/app/agent/tools.py - SQL query layer
gateway-api/queries.py
Dashboard & voice
- Dashboard views
client/src/components/views - Dashboard widgets
client/src/components/dashboard - Admin console
client/src/components/views/AdminDashboardView.jsx - Client data hook
client/src/hooks/useServerData.js - Client API
client/src/services/api.js - Typed agent panel
client/src/components/common/AskPanel.jsx - Voice agent
voice-agent/worker.py
Alerts & reports
- Alerting service
alerting-service/scheduler.py - Telegram commands
alerting-service/handlers.py
Other components
- Game servers
- Gemini API
- LiveKit
- Telegram
Connections 33
- Game servers → A2S ingestion: A2S queries
README.md - A2S ingestion → TimescaleDB: writes metrics
README.md - A2S ingestion → Redis stream: publishes metrics
README.md - Ingestion API → A2S ingestion: starts polling
ingestion-service/main.py - Ingestion API → TimescaleDB: persists polls
ingestion-service/main.py - Ingestion API → Shared schemas: accepts payloads
ingestion-service/main.py - TimescaleDB → Anomaly bridge: provides telemetry
README.md - Anomaly bridge → Anomaly scoring: requests scoring
README.md - Anomaly bridge → Root-cause classifier: requests classification
README.md - Anomaly bridge → TimescaleDB: saves incidents
README.md - TimescaleDB → Gateway API: serves dashboard data
README.md - Gateway API → Ingestion API: forwards polls
README.md - Gateway API → Ingestion API: forwards probes
README.md - Gateway API → Agent router: registers routes
gateway-api/main.py - Agent router → Agent tools: dispatches tools
gateway-api/app/agent/router.py - Agent tools → SQL query layer: uses SQL
gateway-api/app/agent/tools.py - Agent router → Gemini API: requests answers
README.md - Gateway API → Dashboard views: serves HTTP and WS
README.md - Dashboard views → Dashboard widgets: renders views
client/src/components/views/OverviewView.jsx - Dashboard views → Admin console: routes admin view
client/src/components/views/AdminWrapper.jsx - Dashboard views → Client data hook: loads fleet state
client/src/App.jsx - Client data hook → Client API: fetches data
client/src/hooks/useServerData.js - Client API → Gateway API: calls API
README.md - Typed agent panel → Client API: sends questions
client/src/components/common/AskPanel.jsx - TimescaleDB → Alerting service: provides events
README.md - Alerting service → Telegram: sends alerts
README.md - Alerting service → Telegram: sends reports
alerting-service/scheduler.py - Telegram commands → TimescaleDB: reads and updates
alerting-service/handlers.py - Telegram commands → Telegram: replies to commands
alerting-service/handlers.py - Dashboard views → LiveKit: exchanges audio
README.md - LiveKit → Voice agent: routes session
README.md - Voice agent → Gateway API: calls agent tools
README.md - Voice agent → Gemini API: uses realtime model
README.md