- 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
26 lines
702 B
Go
26 lines
702 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
type AlertRule struct {
|
|
ID string `json:"id"`
|
|
DeviceID string `json:"device_id"`
|
|
Metric string `json:"metric"`
|
|
Operator string `json:"operator"`
|
|
Threshold float64 `json:"threshold"`
|
|
Duration int `json:"duration"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
type Alert struct {
|
|
ID string `json:"id"`
|
|
DeviceID string `json:"device_id"`
|
|
RuleID string `json:"rule_id"`
|
|
Metric string `json:"metric"`
|
|
Value float64 `json:"value"`
|
|
Message string `json:"message"`
|
|
Status string `json:"status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
ResolvedAt *time.Time `json:"resolved_at,omitempty"`
|
|
}
|