feat: Agent采集uptime, 后端持久化kernel/uptime/diskIO, 前端磁盘BPS+IOPS展示
- Agent: system.go 添加 readUptime(), SystemStat 携带 Uptime - Backend: Server 模型新增 Kernel 字段, ReceiveReport 持久化 kernel+uptime - Backend: /agent/latest 返回 kernel/uptime/port_info/disk_io_info/disk_total - Frontend: 磁盘监控改为 BPS+IOPS (4张卡片), 系统信息修复内核/运行时长/监听端口/磁盘容量 - 图表单位从 MB/s 改为 KB/s, 添加 formatBPS 工具函数
This commit is contained in:
1 parent
31c2e338a3
commit
5949ec5d0c
48 files changed
+2182
-956
No files matched your search
@@ -94,7 +94,7 @@ type AlertRuleV2 struct {
|
||||
|
||||
// TableName 指定表名
|
||||
func (AlertRuleV2) TableName() string {
|
||||
return "alert_rules_v2"
|
||||
return "monitor_alert_rules_v2"
|
||||
}
|
||||
|
||||
// AlertCondition 告警条件定义
|
||||
@@ -109,6 +109,11 @@ type AlertCondition struct {
|
||||
Window int `json:"window"` // 条件级聚合窗口
|
||||
}
|
||||
|
||||
// TableName 指定表名
|
||||
func (AlertCondition) TableName() string {
|
||||
return "monitor_alert_conditions"
|
||||
}
|
||||
|
||||
// AlertConditionGroup 告警条件组
|
||||
type AlertConditionGroup struct {
|
||||
Conditions []AlertCondition `json:"conditions"` // 条件列表
|
||||
@@ -159,7 +164,7 @@ type AlertNotifyTemplate struct {
|
||||
|
||||
// TableName 指定表名
|
||||
func (AlertNotifyTemplate) TableName() string {
|
||||
return "alert_notify_templates"
|
||||
return "monitor_alert_notify_templates"
|
||||
}
|
||||
|
||||
// TemplateVariable 模板变量定义
|
||||
@@ -209,7 +214,7 @@ type AlertUpgrade struct {
|
||||
|
||||
// TableName 指定表名
|
||||
func (AlertUpgrade) TableName() string {
|
||||
return "alert_upgrades"
|
||||
return "monitor_alert_upgrades"
|
||||
}
|
||||
|
||||
// AlertUpgradeRule 告警升级规则
|
||||
@@ -235,7 +240,7 @@ type AlertUpgradeRecord struct {
|
||||
|
||||
// TableName 指定表名
|
||||
func (AlertUpgradeRecord) TableName() string {
|
||||
return "alert_upgrade_records"
|
||||
return "monitor_alert_upgrade_records"
|
||||
}
|
||||
|
||||
// ============================================
|
||||
@@ -278,7 +283,7 @@ type AlertSilence struct {
|
||||
|
||||
// TableName 指定表名
|
||||
func (AlertSilence) TableName() string {
|
||||
return "alert_silences"
|
||||
return "monitor_alert_silences"
|
||||
}
|
||||
|
||||
// AlertSilenceMatcher 静默匹配条件
|
||||
@@ -349,7 +354,7 @@ type AlertEventV2 struct {
|
||||
|
||||
// TableName 指定表名
|
||||
func (AlertEventV2) TableName() string {
|
||||
return "alert_events_v2"
|
||||
return "monitor_alert_events_v2"
|
||||
}
|
||||
|
||||
// AlertRuleV2CreateRequest 告警规则创建请求
|
||||
|
||||
Reference in new issue
Block a user