修改页面弹窗全屏
This commit is contained in:
@@ -46,7 +46,7 @@ public class hostJob {
|
|||||||
private static final double DISK_RATE = Double.parseDouble(Global.getConfig("biz.host.Disk", "60"));
|
private static final double DISK_RATE = Double.parseDouble(Global.getConfig("biz.host.Disk", "60"));
|
||||||
private static final LoggerUtils logger = LoggerUtils.getInstance();
|
private static final LoggerUtils logger = LoggerUtils.getInstance();
|
||||||
|
|
||||||
@Scheduled(cron = "0 0/15 * * * ?")
|
@Scheduled(cron = "0 0/10 * * * ?")
|
||||||
public void initJob() {
|
public void initJob() {
|
||||||
try {
|
try {
|
||||||
HostStatus();
|
HostStatus();
|
||||||
@@ -88,11 +88,6 @@ public class hostJob {
|
|||||||
* 运行信息更新
|
* 运行信息更新
|
||||||
*/
|
*/
|
||||||
public void syncServerInfo(BizMonitorHost host) {
|
public void syncServerInfo(BizMonitorHost host) {
|
||||||
if (host.getIsAuth().equals("1")) {
|
|
||||||
DockerUtils dockerUtils = new DockerUtils(host.getIpAddress(), host.getCheckTargetPort());
|
|
||||||
List<Container> containerList = dockerUtils.listContainers(true);
|
|
||||||
host.setRunTargetNums(containerList.size());
|
|
||||||
monitorHostService.save(host);
|
|
||||||
BizMonitorAccount monitorAccount = new BizMonitorAccount();
|
BizMonitorAccount monitorAccount = new BizMonitorAccount();
|
||||||
monitorAccount.setHostId(host.getHostId());
|
monitorAccount.setHostId(host.getHostId());
|
||||||
monitorAccount.setUstatus("1");
|
monitorAccount.setUstatus("1");
|
||||||
@@ -146,10 +141,8 @@ public class hostJob {
|
|||||||
logger.error(e.getMessage(), host);
|
logger.error(e.getMessage(), host);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (host.getCheckTargetNums() != containerList.size()) {
|
if (host.getIsAuth().equals("1")) {
|
||||||
BizWarningAlert warningAlert = new BizWarningAlert("ZJ_" + KeyUtil.ObjKey(12, 2), "容器预警", 2, host.getHostname() + "容器预警", "当前主机容器运行数量" + containerList.size() + "与配置数量不一致,请及时处理,主机IP:" + host.getIpAddress(), "业务系统", "0");
|
syncDockerInfo(host);
|
||||||
bizWarningAlertService.save(warningAlert);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,4 +175,15 @@ public class hostJob {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void syncDockerInfo(BizMonitorHost host) {
|
||||||
|
DockerUtils dockerUtils = new DockerUtils(host.getIpAddress(), host.getCheckTargetPort());
|
||||||
|
List<Container> containerList = dockerUtils.listContainers(true);
|
||||||
|
host.setRunTargetNums(containerList.size());
|
||||||
|
monitorHostService.save(host);
|
||||||
|
if (host.getCheckTargetNums() != containerList.size()) {
|
||||||
|
BizWarningAlert warningAlert = new BizWarningAlert("ZJ_" + KeyUtil.ObjKey(12, 2), "容器预警", 2, host.getHostname() + "容器预警", "当前主机容器运行数量" + containerList.size() + "与配置数量不一致,请及时处理,主机IP:" + host.getIpAddress(), "业务系统", "0");
|
||||||
|
bizWarningAlertService.save(warningAlert);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user