# monitor-dashboard monitor-dashboard is a self-hosted server monitoring panel built with Go, Gin, GORM, MySQL, Redis, Vue 3, Vite, Element Plus, ECharts, Docker Compose, and Nginx. ## Core Capabilities - monitor-agent ingestion with token authentication and bounded payload size. - Batch metric writes for CPU, memory, disk, load, uptime, and network telemetry. - Historical metric queries with retention cleanup for metrics and alert events. - WebSocket metric streaming with JWT authentication, Origin allowlisting, and reconnect-friendly clients. - Multi-server dashboard filtering, time-range selection, loading states, empty states, and responsive layouts. - Alert rule management and alert event listing for threshold-based operations. ## Public Pages - http://spiders.spiritlhl.net/monitor : search-friendly monitor dashboard summary for crawlers, redirecting people to the SPA. - http://spiders.spiritlhl.net/sitemap.xml : XML sitemap containing the primary monitor and AI-readable resources. - http://spiders.spiritlhl.net/robots.txt : crawler policy that allows monitor and llms resources while disallowing API crawling. - http://spiders.spiritlhl.net/llms.txt : concise AI-readable summary. - http://spiders.spiritlhl.net/llms-full.txt : this complete AI-readable project summary. ## API Families - POST /api/monitor/agent/report : monitor-agent metric ingestion. - POST /api/monitor/agent/heartbeat : monitor-agent liveness updates. - GET /api/monitor/ws : authenticated WebSocket metric stream. - GET /api/monitor/servers : monitored server list with latest metrics. - GET /api/monitor/metrics : metric history by agent and time range. - GET /api/monitor/summary : dashboard summary counters. - GET /api/monitor/alertRules : alert rule list. - POST /api/monitor/alertRules : create alert rule. - PUT /api/monitor/alertRules : update alert rule. - DELETE /api/monitor/alertRules : delete alert rule. - GET /api/monitor/alertEvents : alert event history. ## Deployment Notes Production deployments should provide strong MYSQL_PASSWORD, JWT_SIGNING_KEY, and MONITOR_AGENT_TOKEN values. Swagger UI is disabled by default outside debug mode and requires SWAGGER_ACCESS_TOKEN when explicitly enabled. Redis can degrade gracefully if unavailable.