- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.sdg.cmdb.service.ZabbixHistoryService.acqResultValue()
方法的一些代码示例,展示了ZabbixHistoryService.acqResultValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZabbixHistoryService.acqResultValue()
方法的具体详情如下:
包路径:com.sdg.cmdb.service.ZabbixHistoryService
类名称:ZabbixHistoryService
方法名:acqResultValue
暂无
代码示例来源:origin: ixrjog/opsCloud
private float acqDiskDataRate(ServerDO serverDO) {
// diskRate
try {
String freeDiskOnData = zabbixHistoryService.acqResultValue(zabbixHistoryService.queryFreeDiskSpaceOnData(serverDO, 1));
float usedDiskOnData = -1;
if (freeDiskOnData != null) {
usedDiskOnData = 100 - Float.parseFloat(freeDiskOnData);
BigDecimal b2 = new BigDecimal(usedDiskOnData);
usedDiskOnData = b2.setScale(2, BigDecimal.ROUND_HALF_UP).floatValue();
}
return usedDiskOnData;
} catch (Exception e) {
logger.error("计算磁盘使用率错误", e);
return -1;
}
}
代码示例来源:origin: ixrjog/opsCloud
private float acqDiskSysRate(ServerDO serverDO) {
// diskRate
try {
String freeDiskOnSys = zabbixHistoryService.acqResultValue(zabbixHistoryService.queryFreeDiskSpaceOnSys(serverDO, 1));
float usedDiskOnSys = -1;
if (freeDiskOnSys != null) {
usedDiskOnSys = 100 - Float.parseFloat(freeDiskOnSys);
BigDecimal b = new BigDecimal(usedDiskOnSys);
usedDiskOnSys = b.setScale(2, BigDecimal.ROUND_HALF_UP).floatValue();
}
return usedDiskOnSys;
} catch (Exception e) {
logger.error("计算磁盘使用率错误", e);
return -1;
}
}
代码示例来源:origin: ixrjog/opsCloud
private void updateTomcatVersionByServer(ServerDO serverDO) {
ServerGroupDO serverGroupDO = serverGroupDao.queryServerGroupById(serverDO.getServerGroupId());
if (configServerGroupService.isTomcatServer(serverGroupDO)) {
String version = zabbixHistoryService.acqResultValue(zabbixHistoryService.queryTomcatVersion(serverDO, 1));
if (StringUtils.isEmpty(serverDO.getExtTomcatVersion()) || !serverDO.getExtTomcatVersion().equals(version)) {
serverDO.setExtTomcatVersion(version);
serverDao.updateServerTomcatVersion(serverDO);
}
}
}
代码示例来源:origin: ixrjog/opsCloud
String memoryTotal = zabbixHistoryService.acqResultValue(zabbixHistoryService.queryMemoryTotal(serverDO, 1));
long memoryRate = 100 - Long.parseLong(memoryAvailableMin) * 100 / Long.parseLong(memoryTotal);
serverPerfVO.setMemoryRate(String.valueOf(memoryRate));
if (diskSysVolume != null) {
try {
long vaReadBps = Long.valueOf(zabbixHistoryService.acqResultValue(zabbixHistoryService.queryDiskReadBps(serverDO, diskSysVolume, 1)));
long vaWriteBps = Long.valueOf(zabbixHistoryService.acqResultValue(zabbixHistoryService.queryDiskWriteBps(serverDO, diskSysVolume, 1)));
serverPerfVO.setDiskSysBps(String.valueOf(vaReadBps + vaWriteBps));
long vaReadIops = Long.valueOf(zabbixHistoryService.acqResultValue(zabbixHistoryService.queryDiskReadIops(serverDO, diskSysVolume, 1)));
long vaWriteIops = Long.valueOf(zabbixHistoryService.acqResultValue(zabbixHistoryService.queryDiskWriteIops(serverDO, diskSysVolume, 1)));
serverPerfVO.setDiskSysIops(String.valueOf(vaReadIops + vaWriteIops));
} catch (Exception e) {
long vaReadMs = Long.valueOf(zabbixHistoryService.acqResultValue(zabbixHistoryService.queryDiskReadMs(serverDO, diskSysVolume, 1)));
long vaWriteMs = Long.valueOf(zabbixHistoryService.acqResultValue(zabbixHistoryService.queryDiskWriteMs(serverDO, diskSysVolume, 1)));
serverPerfVO.setDiskSysReadMs(String.valueOf(vaReadMs));
serverPerfVO.setDiskSysWriteMs(String.valueOf(vaWriteMs));
if (diskDataVolume != null) {
try {
long vbReadBps = Long.valueOf(zabbixHistoryService.acqResultValue(zabbixHistoryService.queryDiskReadBps(serverDO, diskDataVolume, 1)));
long vbWriteBps = Long.valueOf(zabbixHistoryService.acqResultValue(zabbixHistoryService.queryDiskWriteBps(serverDO, diskDataVolume, 1)));
serverPerfVO.setDiskDataBps(String.valueOf(vbReadBps + vbWriteBps));
long vbReadIops = Long.valueOf(zabbixHistoryService.acqResultValue(zabbixHistoryService.queryDiskReadIops(serverDO, diskDataVolume, 1)));
long vbWriteIops = Long.valueOf(zabbixHistoryService.acqResultValue(zabbixHistoryService.queryDiskWriteIops(serverDO, diskDataVolume, 1)));
serverPerfVO.setDiskDataIops(String.valueOf(vbReadIops + vbWriteIops));
代码示例来源:origin: ixrjog/opsCloud
@Test
public void test() {
ServerDO s1 = serverDao.getServerInfoById(752);
ServerDO outway2 = serverDao.getServerInfoById(108);
ServerDO serverDO = s1;
System.err.println(s1);
long sysDiskRate = 0;
String freeDiskOnSys = zabbixHistoryService.acqResultValue(zabbixHistoryService.queryFreeDiskSpaceOnSys(serverDO, 1));
System.err.println("freeDiskOnSys:" + freeDiskOnSys);
String freeDiskOnData = zabbixHistoryService.acqResultValue(zabbixHistoryService.queryFreeDiskSpaceOnData(serverDO, 1));
System.err.println("freeDiskOnData:" + freeDiskOnData);
//sysDiskRate = Long.parseLong(usedDiskSpaceOnSys) * 100 / Long.parseLong(totalDiskSpaceOnSys);
//String usedDiskSpaceOnData = zabbixHistoryService.acqResultValue(zabbixHistoryService.queryUsedDiskSpaceOnData(serverDO, 1));
//String totalDiskSpaceOnData = zabbixHistoryService.acqResultValue(zabbixHistoryService.queryTotalDiskSpaceOnData(serverDO, 1));
//long dataDiskRate = Long.parseLong(usedDiskSpaceOnData) * 100 / Long.parseLong(totalDiskSpaceOnData);
//System.err.println("sysDiskRate:" + sysDiskRate);
//System.err.println("dataDiskRate:" + dataDiskRate);
}
我创建了一个子网,在其中连接 Cosmos DB 作为服务端点。除了 Cosmos DB 的 IP 防火墙之外,我还想通过 NSG 规则控制出站。但是,如果我创建一条规则,拒绝所有出站(也通过拒绝所有
本文整理了Java中com.sdg.cmdb.service.ZabbixHistoryService类的一些代码示例,展示了ZabbixHistoryService类的具体用法。这些代码示例主要来源
本文整理了Java中com.sdg.cmdb.service.impl.ZabbixServiceImpl类的一些代码示例,展示了ZabbixServiceImpl类的具体用法。这些代码示例主要来源于
本文整理了Java中com.sdg.cmdb.service.ZabbixHistoryService.queryFreeDiskSpaceOnData()方法的一些代码示例,展示了ZabbixHis
本文整理了Java中com.sdg.cmdb.service.ZabbixHistoryService.acqResultValue()方法的一些代码示例,展示了ZabbixHistoryServic
本文整理了Java中com.sdg.cmdb.service.ZabbixHistoryService.queryFreeDiskSpaceOnSys()方法的一些代码示例,展示了ZabbixHist
本文整理了Java中com.sdg.cmdb.domain.configCenter.itemEnum.ZabbixItemEnum类的一些代码示例,展示了ZabbixItemEnum类的具体用法。这
嗨,所有使用 Spring 数据图的耐心开发人员。由于文档太少且测试覆盖率很低,因此有时很难理解底层框架的预期行为是什么,框架应该如何工作。目前我有一些与 SDG 1.1 中引入的新获取方法相关的问题
本文整理了Java中com.sdg.cmdb.domain.configCenter.itemEnum.ZabbixItemEnum.getItemKey()方法的一些代码示例,展示了ZabbixIt
我是一名优秀的程序员,十分优秀!