0e8c9f7bffb42893de2234f91cbca33ae8ff27e2
- Client: Go-based Windows hardware monitoring (CPU, GPU, memory, disk, network, power) - Server: Go + Gin + SQLite backend with REST API - Frontend: Vue 3 + Element Plus dashboard - Docker deployment support - Windows service installation script
PC Monitor
A monitoring system for Windows PCs that tracks CPU, GPU, memory, network, disk, and power status.
Architecture
- Client: Windows executable (.exe) that collects hardware metrics
- Server: Go backend with SQLite database
- Frontend: Vue 3 + Element Plus web dashboard
- Deployment: Docker support for server
Quick Start
Server (Docker)
- Build and start the server:
docker-compose up -d
- Access the web dashboard at http://localhost:8080
Client (Windows)
- Download the client executable
- Edit
config.yamlto set your server URL - Run the client:
.\pc-monitor-client.exe
Or install as a Windows service:
.\install\install.ps1 -ServerUrl "http://your-server:8080"
Development
Prerequisites
- Go 1.21+
- Node.js 18+
- Docker (optional)
Build Server
cd server
go mod tidy
go build -o server .
Build Client
cd client
go mod tidy
go build -o pc-monitor-client.exe .
Build Frontend
cd web
npm install
npm run build
API Endpoints
Device Management
POST /api/v1/register- Register a new deviceGET /api/v1/devices- List all devicesGET /api/v1/devices/:id- Get device detailsDELETE /api/v1/devices/:id- Delete a devicePOST /api/v1/devices/:id/heartbeat- Send heartbeat
Metrics
POST /api/v1/report- Report metricsGET /api/v1/devices/:id/metrics/latest- Get latest metricsGET /api/v1/devices/:id/metrics/history- Get metrics history
Alerts
GET /api/v1/alerts- List active alertsPOST /api/v1/alerts/rules- Create alert ruleGET /api/v1/devices/:id/alerts/rules- Get device alert rulesDELETE /api/v1/alerts/rules/:id- Delete alert rulePOST /api/v1/alerts/:id/resolve- Resolve alert
Configuration
Server Configuration (config.yaml)
server:
addr: ":8080"
database:
path: "./data/monitor.db"
retention_days: 30
auth:
admin_password: "admin123"
Client Configuration (config.yaml)
server:
url: "http://your-server:8080"
token: ""
collect:
interval: 30s
report:
interval: 60s
License
MIT License
Description
Languages
Go
53.6%
Vue
38.4%
PowerShell
4.1%
TypeScript
3%
HTML
0.5%
Other
0.4%