Commit 9132c687 authored by gaozhentao's avatar gaozhentao

1.新增告警和告警记录查询

parent 346b0d98
This diff is collapsed.
......@@ -44,6 +44,7 @@ public class HttpTask extends BasicTask{
public void doTask(Server_Host_Info hostInfo, ConcurrentHashMap<String, String> alarmHost) {
HttpEntity<String> requestEntity;
ResponseEntity<String> responseEntity = null;
long dur = 0;
long start = System.currentTimeMillis();
......@@ -58,6 +59,9 @@ public class HttpTask extends BasicTask{
responseEntity = restTemplate.getForEntity(hostInfo.getService_path(), String.class);
}
dur = System.currentTimeMillis() - start;
System.out.println("====================测试===================================");
System.out.println(responseEntity.getBody());
System.out.println("================================================================================");
} catch (RestClientException e) {
insertToKairos(httpClient, hostInfo.getHost_ip(), hostInfo.getHost_port(), dur, false);
logger.info("httpTask to {}", hostInfo.getService_path());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment