Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
王蔡翾
operation_platform
Commits
0f11814d
Commit
0f11814d
authored
Mar 05, 2026
by
wujipeng
Browse files
服务器监控
parent
454aef65
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/example/operation_platform/model/entity/ProjectServerAlertsEntity.java
View file @
0f11814d
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -23,22 +24,29 @@ public class ProjectServerAlertsEntity {
...
@@ -23,22 +24,29 @@ public class ProjectServerAlertsEntity {
private
Integer
id
;
private
Integer
id
;
@TableField
(
"alert_time"
)
@TableField
(
"alert_time"
)
@ApiModelProperty
(
value
=
"告警时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
alertTime
;
private
Date
alertTime
;
@TableField
(
"alert_type"
)
@TableField
(
"alert_type"
)
@ApiModelProperty
(
value
=
"'CPU', 'MEMORY'"
)
private
String
alertType
;
private
String
alertType
;
@TableField
(
"metric_value"
)
@TableField
(
"metric_value"
)
@ApiModelProperty
(
value
=
"触发值"
)
private
String
metricValue
;
private
String
metricValue
;
@ApiModelProperty
(
value
=
"阈值"
)
private
String
threshold
;
private
String
threshold
;
@TableField
(
"ip_address"
)
@TableField
(
"ip_address"
)
@ApiModelProperty
(
value
=
"ip地址"
)
private
String
ipAddress
;
private
String
ipAddress
;
@ApiModelProperty
(
value
=
"描述"
)
private
String
description
;
private
String
description
;
@ApiModelProperty
(
value
=
"是否已解决"
)
private
Boolean
resolved
;
private
Boolean
resolved
;
}
}
src/main/java/com/example/operation_platform/model/entity/ProjectServerMonitorEntity.java
View file @
0f11814d
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -28,18 +29,23 @@ public class ProjectServerMonitorEntity {
...
@@ -28,18 +29,23 @@ public class ProjectServerMonitorEntity {
private
Date
timestamp
;
private
Date
timestamp
;
@TableField
(
value
=
"cpu_percent"
)
@TableField
(
value
=
"cpu_percent"
)
@ApiModelProperty
(
value
=
"cpu使用率"
)
private
String
cpuPercent
;
private
String
cpuPercent
;
@TableField
(
value
=
"memory_percent"
)
@TableField
(
value
=
"memory_percent"
)
@ApiModelProperty
(
value
=
"内存使用率"
)
private
String
memoryPercent
;
private
String
memoryPercent
;
@TableField
(
value
=
"read_count"
)
@TableField
(
value
=
"read_count"
)
@ApiModelProperty
(
value
=
"磁盘读取次数"
)
private
Integer
readCount
;
private
Integer
readCount
;
@TableField
(
value
=
"write_count"
)
@TableField
(
value
=
"write_count"
)
@ApiModelProperty
(
value
=
"磁盘写入次数"
)
private
Integer
writeCount
;
private
Integer
writeCount
;
@TableField
(
value
=
"ip_address"
)
@TableField
(
value
=
"ip_address"
)
@ApiModelProperty
(
value
=
"ip地址"
)
private
String
ipAddress
;
private
String
ipAddress
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment