告警记录优化
This commit is contained in:
parent
3b7cb6da7a
commit
96e50b4462
@ -0,0 +1,26 @@
|
||||
package cn.iocoder.yudao.module.trade.doTest;
|
||||
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryExpressDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class DoKDTest {
|
||||
|
||||
@Test
|
||||
public void test(){
|
||||
String url = "http://127.0.0.1:6127/admin-api/trade/delivery/express-template/doTest";
|
||||
DeliveryExpressDO expressDO = new DeliveryExpressDO();
|
||||
expressDO.setCode("134435");
|
||||
expressDO.setLogo("scsdc");
|
||||
expressDO.setName("jjjj");
|
||||
HttpResponse postSec = HttpUtil.createPost(url)
|
||||
.header("Content-Type","application/x-www-form-urlencoded")
|
||||
.header("tenant-id","1")
|
||||
.body(expressDO.toString())
|
||||
.execute();
|
||||
System.out.println(postSec.body());
|
||||
}
|
||||
}
|
@ -82,7 +82,7 @@ public class WarningJob implements JobHandler {
|
||||
OperateWarningDO spaceWarningDO = new OperateWarningDO();
|
||||
spaceWarningDO.setAlarmPolicy("磁盘告警策略");
|
||||
spaceWarningDO.setMonitoringObject("磁盘");
|
||||
spaceWarningDO.setTriggeringCondition("当磁盘占用率达到"+Double.parseDouble(configCountProcessCPUDo.getLabel())*100+"%");
|
||||
spaceWarningDO.setTriggeringCondition("当磁盘占用率达到"+Double.parseDouble(configCountDo.getLabel())*100+"%");
|
||||
operateWarningMapper.insert(spaceWarningDO);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user