package com.wgcloud.entity;
|
|
import com.wgcloud.util.DateUtil;
|
import com.wgcloud.util.FormatUtil;
|
import org.apache.commons.lang3.StringUtils;
|
|
import java.util.Date;
|
|
/**
|
* @version v3.3
|
* @ClassName:SystemInfo.java
|
* @author: http://www.wgstart.com
|
* @date: 2021年1月16日
|
* @Description: 系统信息
|
* @Copyright: 2019-2021 wgcloud. All rights reserved.
|
*/
|
public class SystemInfo extends BaseEntity {
|
|
|
/**
|
*
|
*/
|
private static final long serialVersionUID = 1L;
|
|
|
/**
|
* host名称,整个监控系统hostname为主机唯一标识
|
*/
|
private String hostname;
|
|
/**
|
* 系统版本信息
|
*/
|
private String platForm;
|
|
/**
|
* 系统版本详细信息
|
*/
|
private String platformVersion;
|
|
/**
|
* 运行时间,秒
|
*/
|
private Long uptime;
|
/**
|
* 数据库无此字段,用于回显
|
*/
|
private String uptimeStr;
|
|
/**
|
* 启动时间,秒
|
*/
|
private Long bootTime;
|
/**
|
* 数据库无此字段,用于回显
|
*/
|
private String bootTimeStr;
|
|
/**
|
* 进程数量
|
*/
|
private String procs;
|
|
/**
|
* 内存使用率
|
*/
|
private Double memPer;
|
|
/**
|
* core的个数(即cpu核数)
|
*/
|
private String cpuCoreNum;
|
|
/**
|
* cpu使用率
|
*/
|
private Double cpuPer;
|
|
/**
|
* CPU型号信息
|
*/
|
private String cpuXh;
|
|
|
/**
|
* 主机状态,1正常,2下线
|
*/
|
private String state;
|
|
/**
|
* agent版本
|
*/
|
private String agentVer;
|
|
|
/**
|
* 创建时间
|
*/
|
private Date createTime;
|
|
/**
|
* 备注
|
*/
|
private String remark;
|
|
/**
|
* 内存总大小
|
*/
|
private String totalMem;
|
|
/**
|
* 上报数据频率
|
*/
|
private String submitSeconds;
|
|
/**
|
* 累计接收流量G
|
*/
|
private String bytesRecv;
|
|
/**
|
* 累计发送流量G
|
*/
|
private String bytesSent;
|
|
/**
|
* 每秒钟接收的KB数,下行传输速率,KB/s
|
*/
|
private String rxbyt;
|
|
|
/**
|
* 每秒钟发送的KB数,上行传输速率,KB/s
|
*/
|
private String txbyt;
|
|
/**
|
* windows服务http地址,linux此值为空
|
*/
|
private String winConsole;
|
|
/**
|
* 主机名,只用于显示,不做唯一标识及关联
|
*/
|
private String hostnameExt;
|
|
/**
|
* 5分钟之前到现在的负载
|
*/
|
private Double fiveLoad;
|
|
/**
|
* 15分钟之前到现在的负载
|
*/
|
private Double fifteenLoad;
|
|
/**
|
* 主机连接数量包括tcp、udp、inet
|
*/
|
private String netConnections;
|
|
/**
|
* 主机分组ID
|
*/
|
private String groupId;
|
|
/**
|
* 所属用户账号
|
*/
|
private String account;
|
|
/**
|
* 交换区内存总大小
|
*/
|
private String totalSwapMem;
|
|
/**
|
* 交换区内存使用率百分比
|
*/
|
private String swapMemPer;
|
|
//进程数量,数据库无此字段,暂未用
|
private String groupName;
|
//端口数量,数据库无此字段,暂未用
|
private String portName;
|
//docker数量,数据库无此字段,暂未用
|
private String dockerName;
|
//监控日志数量,数据库无此字段,暂未用
|
private String fileWarnName;
|
//系统图标,数据库无此字段
|
private String image;
|
//磁盘总使用率%,数据库无此字段
|
private Double diskPer;
|
//下发指令添加页面回显使用是否选中,数据库无此字段
|
private String selected;
|
//累积告警次数,页面显示用,数据库无此字段
|
private Integer warnCount;
|
//累积告警次数查询关键字,页面显示用,数据库无此字段
|
private String warnQueryWd;
|
|
|
public String getHostname() {
|
return hostname;
|
}
|
|
public void setHostname(String hostname) {
|
this.hostname = hostname;
|
}
|
|
public String getPlatForm() {
|
return platForm;
|
}
|
|
public void setPlatForm(String platForm) {
|
this.platForm = platForm;
|
}
|
|
public String getPlatformVersion() {
|
return platformVersion;
|
}
|
|
public void setPlatformVersion(String platformVersion) {
|
this.platformVersion = platformVersion;
|
}
|
|
public Long getUptime() {
|
return uptime;
|
}
|
|
public void setUptime(Long uptime) {
|
this.uptime = uptime;
|
}
|
|
public Long getBootTime() {
|
return bootTime;
|
}
|
|
public void setBootTime(Long bootTime) {
|
this.bootTime = bootTime;
|
}
|
|
public Double getMemPer() {
|
if (null == memPer) {
|
memPer = 0d;
|
}
|
return memPer;
|
}
|
|
public void setMemPer(Double memPer) {
|
this.memPer = memPer;
|
}
|
|
public String getCpuCoreNum() {
|
return cpuCoreNum;
|
}
|
|
public void setCpuCoreNum(String cpuCoreNum) {
|
this.cpuCoreNum = cpuCoreNum;
|
}
|
|
public Double getCpuPer() {
|
if (null == cpuPer) {
|
cpuPer = 0d;
|
}
|
return cpuPer;
|
}
|
|
public void setCpuPer(Double cpuPer) {
|
this.cpuPer = cpuPer;
|
}
|
|
public String getCpuXh() {
|
return cpuXh;
|
}
|
|
public void setCpuXh(String cpuXh) {
|
this.cpuXh = cpuXh;
|
}
|
|
public String getState() {
|
return state;
|
}
|
|
public void setState(String state) {
|
this.state = state;
|
}
|
|
public Date getCreateTime() {
|
return createTime;
|
}
|
|
public void setCreateTime(Date createTime) {
|
this.createTime = createTime;
|
}
|
|
public String getGroupId() {
|
return groupId;
|
}
|
|
public void setGroupId(String groupId) {
|
this.groupId = groupId;
|
}
|
|
public String getGroupName() {
|
return groupName;
|
}
|
|
public void setGroupName(String groupName) {
|
this.groupName = groupName;
|
}
|
|
public String getProcs() {
|
return procs;
|
}
|
|
public void setProcs(String procs) {
|
this.procs = procs;
|
}
|
|
public String getRemark() {
|
return remark;
|
}
|
|
public void setRemark(String remark) {
|
this.remark = remark;
|
}
|
|
public String getTotalMem() {
|
return totalMem;
|
}
|
|
public void setTotalMem(String totalMem) {
|
this.totalMem = totalMem;
|
}
|
|
public String getUptimeStr() {
|
return FormatUtil.timesToDay(uptime);
|
}
|
|
public void setUptimeStr(String uptimeStr) {
|
this.uptimeStr = uptimeStr;
|
}
|
|
public String getBootTimeStr() {
|
return DateUtil.secondToDate(bootTime, "yyyy-MM-dd HH:mm:ss");
|
}
|
|
public void setBootTimeStr(String bootTimeStr) {
|
this.bootTimeStr = bootTimeStr;
|
}
|
|
public String getSubmitSeconds() {
|
if (StringUtils.isEmpty(submitSeconds)) {
|
submitSeconds = "120";
|
}
|
return submitSeconds;
|
}
|
|
public void setSubmitSeconds(String submitSeconds) {
|
this.submitSeconds = submitSeconds;
|
}
|
|
public String getAgentVer() {
|
return agentVer;
|
}
|
|
public void setAgentVer(String agentVer) {
|
this.agentVer = agentVer;
|
}
|
|
public String getPortName() {
|
return portName;
|
}
|
|
public void setPortName(String portName) {
|
this.portName = portName;
|
}
|
|
public String getDockerName() {
|
return dockerName;
|
}
|
|
public void setDockerName(String dockerName) {
|
this.dockerName = dockerName;
|
}
|
|
public String getImage() {
|
return image;
|
}
|
|
public void setImage(String image) {
|
this.image = image;
|
}
|
|
public String getFileWarnName() {
|
return fileWarnName;
|
}
|
|
public void setFileWarnName(String fileWarnName) {
|
this.fileWarnName = fileWarnName;
|
}
|
|
public Double getDiskPer() {
|
return diskPer;
|
}
|
|
public void setDiskPer(Double diskPer) {
|
this.diskPer = diskPer;
|
}
|
|
public String getBytesRecv() {
|
return bytesRecv;
|
}
|
|
public void setBytesRecv(String bytesRecv) {
|
this.bytesRecv = bytesRecv;
|
}
|
|
public String getBytesSent() {
|
return bytesSent;
|
}
|
|
public void setBytesSent(String bytesSent) {
|
this.bytesSent = bytesSent;
|
}
|
|
public String getRxbyt() {
|
if (StringUtils.isEmpty(rxbyt)) {
|
rxbyt = "0";
|
}
|
return rxbyt;
|
}
|
|
public void setRxbyt(String rxbyt) {
|
this.rxbyt = rxbyt;
|
}
|
|
public String getTxbyt() {
|
if (StringUtils.isEmpty(txbyt)) {
|
txbyt = "0";
|
}
|
return txbyt;
|
}
|
|
public void setTxbyt(String txbyt) {
|
this.txbyt = txbyt;
|
}
|
|
public String getWinConsole() {
|
return winConsole;
|
}
|
|
public void setWinConsole(String winConsole) {
|
this.winConsole = winConsole;
|
}
|
|
public String getSelected() {
|
return selected;
|
}
|
|
public void setSelected(String selected) {
|
this.selected = selected;
|
}
|
|
public String getHostnameExt() {
|
return hostnameExt;
|
}
|
|
public void setHostnameExt(String hostnameExt) {
|
this.hostnameExt = hostnameExt;
|
}
|
|
public Double getFiveLoad() {
|
if (null == fiveLoad) {
|
fiveLoad = 0d;
|
}
|
return fiveLoad;
|
}
|
|
public void setFiveLoad(Double fiveLoad) {
|
this.fiveLoad = fiveLoad;
|
}
|
|
public Double getFifteenLoad() {
|
if (null == fifteenLoad) {
|
fifteenLoad = 0d;
|
}
|
return fifteenLoad;
|
}
|
|
public void setFifteenLoad(Double fifteenLoad) {
|
this.fifteenLoad = fifteenLoad;
|
}
|
|
public Integer getWarnCount() {
|
return warnCount;
|
}
|
|
public void setWarnCount(Integer warnCount) {
|
this.warnCount = warnCount;
|
}
|
|
public String getNetConnections() {
|
return netConnections;
|
}
|
|
public void setNetConnections(String netConnections) {
|
this.netConnections = netConnections;
|
}
|
|
public String getTotalSwapMem() {
|
return totalSwapMem;
|
}
|
|
public void setTotalSwapMem(String totalSwapMem) {
|
this.totalSwapMem = totalSwapMem;
|
}
|
|
public String getSwapMemPer() {
|
return swapMemPer;
|
}
|
|
public void setSwapMemPer(String swapMemPer) {
|
this.swapMemPer = swapMemPer;
|
}
|
|
public String getWarnQueryWd() {
|
return warnQueryWd;
|
}
|
|
public void setWarnQueryWd(String warnQueryWd) {
|
this.warnQueryWd = warnQueryWd;
|
}
|
|
public String getAccount() {
|
return account;
|
}
|
|
public void setAccount(String account) {
|
this.account = account;
|
}
|
}
|