서버상태, httpclient 수정
This commit is contained in:
@@ -1,11 +1,17 @@
|
|||||||
package com.kamco.cd.kamcoback.Innopam;
|
package com.kamco.cd.kamcoback.Innopam;
|
||||||
|
|
||||||
|
import com.kamco.cd.kamcoback.Innopam.dto.ChngDetectMastDto;
|
||||||
|
import com.kamco.cd.kamcoback.Innopam.dto.ChngDetectMastDto.ChnDetectMastReqDto;
|
||||||
|
import com.kamco.cd.kamcoback.Innopam.dto.ChngDetectMastDto.ChngDetectMastSearchDto;
|
||||||
|
import com.kamco.cd.kamcoback.Innopam.dto.ChngDetectMastDto.ResReturn;
|
||||||
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto;
|
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto;
|
||||||
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto.Basic;
|
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto.Basic;
|
||||||
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto.DetectMastReq;
|
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto.DetectMastReq;
|
||||||
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto.DetectMastSearch;
|
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto.DetectMastSearch;
|
||||||
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto.FeaturePnuDto;
|
import com.kamco.cd.kamcoback.Innopam.dto.DetectMastDto.FeaturePnuDto;
|
||||||
import com.kamco.cd.kamcoback.Innopam.service.DetectMastService;
|
import com.kamco.cd.kamcoback.Innopam.service.DetectMastService;
|
||||||
|
import com.kamco.cd.kamcoback.Innopam.service.InnopamApiService;
|
||||||
|
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.media.Content;
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
@@ -26,13 +32,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@Tag(name = "이노펨 mockup API", description = "이노펨 mockup API")
|
@Tag(name = "이노펨 연동 API", description = "이노펨 연동 API")
|
||||||
@RestController
|
@RestController
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RequestMapping("/api/kcd/cdi/detect")
|
@RequestMapping("/api/innopam/")
|
||||||
public class InnopamApiController {
|
public class InnopamApiController {
|
||||||
|
|
||||||
private final DetectMastService detectMastService;
|
private final InnopamApiService innopamApiService;
|
||||||
|
|
||||||
/** 탐지결과 등록 */
|
/** 탐지결과 등록 */
|
||||||
@Operation(summary = "탐지결과 등록", description = "탐지결과 등록")
|
@Operation(summary = "탐지결과 등록", description = "탐지결과 등록")
|
||||||
@@ -49,142 +55,57 @@ public class InnopamApiController {
|
|||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@PostMapping("/mast/regist")
|
@PostMapping("/mast/regist")
|
||||||
public DetectMastReq setChangeDetection(
|
public ChngDetectMastDto.Basic regist(
|
||||||
@RequestBody @Valid DetectMastDto.DetectMastReq detectMast) {
|
@RequestBody @Valid ChngDetectMastDto.ChnDetectMastReqDto chnDetectMastReq) {
|
||||||
detectMastService.saveDetectMast(detectMast);
|
//innopamApiService.saveDetectMast(chnDetectMastReq);
|
||||||
return detectMast;
|
return innopamApiService.regist(chnDetectMastReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Operation(summary = "탐지결과 삭제", description = "탐지결과 삭제")
|
@Operation(summary = "탐지결과 삭제", description = "탐지결과 삭제")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
responseCode = "201",
|
responseCode = "201",
|
||||||
description = "등록 성공",
|
description = "등록 성공",
|
||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema = @Schema(implementation = DetectMastReq.class))),
|
schema = @Schema(implementation = ChnDetectMastReqDto.class))),
|
||||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@PostMapping("/mast/remove")
|
@PostMapping("/mast/remove")
|
||||||
public String deleteChangeDetection(@RequestBody DetectMastReq detectMast) {
|
public ResReturn remove(
|
||||||
return "OK";
|
@RequestBody @Valid ChngDetectMastDto.ChnDetectMastReqDto chnDetectMastReq) {
|
||||||
|
return innopamApiService.remove(chnDetectMastReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "탐지결과 등록목록 조회", description = "탐지결과 등록목록 조회")
|
@Operation(summary = "탐지결과 등록목록 조회", description = "탐지결과 등록목록 조회")
|
||||||
@GetMapping("/mast/list")
|
@GetMapping("/mast/list")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
responseCode = "200",
|
responseCode = "200",
|
||||||
description = "목록 성공",
|
description = "목록 성공",
|
||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema = @Schema(implementation = Basic.class))),
|
schema = @Schema(implementation = Basic.class))),
|
||||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
public List<Basic> selectChangeDetectionList(
|
public List<ChngDetectMastDto.Basic> selectChangeDetectionList(
|
||||||
@RequestParam(required = false) String cprsBfYr,
|
@RequestParam(required = false) String chnDtctId,
|
||||||
@RequestParam(required = false) String cprsAdYr,
|
@RequestParam(required = false) String cprsYr,
|
||||||
@RequestParam(required = false) Integer dtctSno) {
|
@RequestParam(required = false) String crtrYr,
|
||||||
DetectMastSearch detectMastSearch = new DetectMastSearch();
|
@RequestParam(required = false) String chnDtctSno) {
|
||||||
detectMastSearch.setCprsAdYr(cprsAdYr);
|
ChngDetectMastSearchDto searchDto = new ChngDetectMastSearchDto();
|
||||||
detectMastSearch.setCprsBfYr(cprsBfYr);
|
searchDto.setChnDtctId(chnDtctId);
|
||||||
detectMastSearch.setDtctSno(dtctSno);
|
searchDto.setCprsYr(cprsYr);
|
||||||
return detectMastService.selectDetectMast(detectMastSearch);
|
searchDto.setCrtrYr(crtrYr);
|
||||||
|
searchDto.setChnDtctSno(chnDtctSno);
|
||||||
|
return innopamApiService.list(searchDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "탐지결과 등록목록 상세 조회", description = "탐지결과 등록목록 상세 조회")
|
|
||||||
@ApiResponses(
|
|
||||||
value = {
|
|
||||||
@ApiResponse(
|
|
||||||
responseCode = "200",
|
|
||||||
description = "목록 성공",
|
|
||||||
content =
|
|
||||||
@Content(
|
|
||||||
mediaType = "application/json",
|
|
||||||
schema = @Schema(implementation = Basic.class))),
|
|
||||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
|
||||||
})
|
|
||||||
@GetMapping("/mast/list/{dtctMstId}")
|
|
||||||
public Basic selectChangeDetectionDetail(@PathVariable Long dtctMstId) {
|
|
||||||
return detectMastService.selectDetectMast(dtctMstId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "탐지객체 랜덤 PNU 리스트 조회", description = "탐지객체 PNU 랜덤값을 생성해서 보여준다")
|
|
||||||
@ApiResponses(
|
|
||||||
value = {
|
|
||||||
@ApiResponse(
|
|
||||||
responseCode = "200",
|
|
||||||
description = "목록 성공",
|
|
||||||
content =
|
|
||||||
@Content(
|
|
||||||
mediaType = "application/json",
|
|
||||||
schema = @Schema(implementation = FeaturePnuDto.class))),
|
|
||||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
|
||||||
})
|
|
||||||
@GetMapping("/pnu/{cprsBfYr}/{cprsAfYr}/{dtctSno}")
|
|
||||||
public List<FeaturePnuDto> selectPnuList(
|
|
||||||
@PathVariable String cprsBfYr, @PathVariable String cprsAfYr, @PathVariable Integer dtctSno) {
|
|
||||||
DetectMastSearch detectMastSearch = new DetectMastSearch();
|
|
||||||
detectMastSearch.setCprsAdYr(cprsAfYr);
|
|
||||||
detectMastSearch.setCprsBfYr(cprsBfYr);
|
|
||||||
detectMastSearch.setDtctSno(dtctSno);
|
|
||||||
return detectMastService.findPnuData(detectMastSearch);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "탐지객체 랜덤 PNU 상세 조회", description = "탐지객체 PNU 랜덤값을 생성해서 보여준다")
|
|
||||||
@ApiResponses(
|
|
||||||
value = {
|
|
||||||
@ApiResponse(
|
|
||||||
responseCode = "200",
|
|
||||||
description = "목록 성공",
|
|
||||||
content =
|
|
||||||
@Content(
|
|
||||||
mediaType = "application/json",
|
|
||||||
schema = @Schema(implementation = FeaturePnuDto.class))),
|
|
||||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
|
||||||
})
|
|
||||||
@GetMapping("/pnu/{cprsBfYr}/{cprsAfYr}/{dtctSno}/{featureId}")
|
|
||||||
public FeaturePnuDto selectPnuDetail(
|
|
||||||
@Parameter(description = "이전년도", example = "2022") @PathVariable String cprsBfYr,
|
|
||||||
@Parameter(description = "기준년도", example = "2024") @PathVariable String cprsAfYr,
|
|
||||||
@Parameter(description = "회차", example = "4") @PathVariable Integer dtctSno,
|
|
||||||
@Parameter(description = "featureId", example = "000e161b-1955-4c89-ad87-0b3b4a91d00f")
|
|
||||||
@PathVariable
|
|
||||||
UUID featureId) {
|
|
||||||
return detectMastService.selectPnuDetail(featureId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(
|
|
||||||
summary = "탐지객체 랜덤 PNU GEOM 업데이트(이노펨에 없는 API)",
|
|
||||||
description = "탐지객체 랜덤 PNU GEOM 업데이트(이노펨에 없는 API)")
|
|
||||||
@ApiResponses(
|
|
||||||
value = {
|
|
||||||
@ApiResponse(
|
|
||||||
responseCode = "201",
|
|
||||||
description = "pnu 업데이트 성공",
|
|
||||||
content =
|
|
||||||
@Content(
|
|
||||||
mediaType = "application/json",
|
|
||||||
schema = @Schema(implementation = Integer.class))),
|
|
||||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
|
||||||
})
|
|
||||||
@PutMapping("/pnu/{cprsBfYr}/{cprsAfYr}/{dtctSno}")
|
|
||||||
public Integer updatePnuList(
|
|
||||||
@PathVariable String cprsBfYr, @PathVariable String cprsAfYr, @PathVariable Integer dtctSno) {
|
|
||||||
DetectMastSearch detectMastSearch = new DetectMastSearch();
|
|
||||||
detectMastSearch.setCprsAdYr(cprsAfYr);
|
|
||||||
detectMastSearch.setCprsBfYr(cprsBfYr);
|
|
||||||
detectMastSearch.setDtctSno(dtctSno);
|
|
||||||
return detectMastService.updatePnuData(detectMastSearch);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -439,6 +439,7 @@ public class FIleChecker {
|
|||||||
String parentPath = path.getParent().toString();
|
String parentPath = path.getParent().toString();
|
||||||
String fullPath = path.toAbsolutePath().toString();
|
String fullPath = path.toAbsolutePath().toString();
|
||||||
|
|
||||||
|
|
||||||
File file = new File(fullPath);
|
File file = new File(fullPath);
|
||||||
long fileSize = file.length();
|
long fileSize = file.length();
|
||||||
String lastModified = dttmFormat.format(new Date(file.lastModified()));
|
String lastModified = dttmFormat.format(new Date(file.lastModified()));
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.kamco.cd.kamcoback.config.resttemplate;
|
package com.kamco.cd.kamcoback.config.resttemplate;
|
||||||
|
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.http.HttpEntity;
|
import org.springframework.http.HttpEntity;
|
||||||
@@ -69,4 +71,6 @@ public class ExternalHttpClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public record ExternalCallResult<T>(int statusCode, boolean success, T body) {}
|
public record ExternalCallResult<T>(int statusCode, boolean success, T body) {}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -537,9 +537,9 @@ public class InferenceResultDto {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getServerStatusName() {
|
public String getServerStatusName() {
|
||||||
// String enumId = "SAFETY";
|
String enumStr = ServerStatus.SAFETY.getText();
|
||||||
// if( this.cpu_user+this.cpu_system >= 80 )enumId = "CAUTION";
|
if( this.cpu_user+this.cpu_system+this.gpuUtil+this.kbmemused == 0 )enumStr = ServerStatus.FAILUR.getText();
|
||||||
return ServerStatus.SAFETY.getText();
|
return enumStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCpuStatus() {
|
public String getCpuStatus() {
|
||||||
@@ -547,6 +547,9 @@ public class InferenceResultDto {
|
|||||||
if (this.cpu_user + this.cpu_system >= 80) {
|
if (this.cpu_user + this.cpu_system >= 80) {
|
||||||
enumId = "CAUTION";
|
enumId = "CAUTION";
|
||||||
}
|
}
|
||||||
|
else if (this.cpu_user + this.cpu_system == 0) {
|
||||||
|
enumId = "FAILUR";
|
||||||
|
}
|
||||||
return enumId;
|
return enumId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -555,6 +558,9 @@ public class InferenceResultDto {
|
|||||||
if (this.gpuUtil >= 80) {
|
if (this.gpuUtil >= 80) {
|
||||||
enumId = "CAUTION";
|
enumId = "CAUTION";
|
||||||
}
|
}
|
||||||
|
else if (this.cpu_user + this.cpu_system == 0) {
|
||||||
|
enumId = "FAILUR";
|
||||||
|
}
|
||||||
return enumId;
|
return enumId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -563,6 +569,9 @@ public class InferenceResultDto {
|
|||||||
if (this.memused >= 80) {
|
if (this.memused >= 80) {
|
||||||
enumId = "CAUTION";
|
enumId = "CAUTION";
|
||||||
}
|
}
|
||||||
|
else if (this.cpu_user + this.cpu_system == 0) {
|
||||||
|
enumId = "FAILUR";
|
||||||
|
}
|
||||||
return enumId;
|
return enumId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -570,6 +579,9 @@ public class InferenceResultDto {
|
|||||||
if (this.cpu_user + this.cpu_system >= 80) {
|
if (this.cpu_user + this.cpu_system >= 80) {
|
||||||
return ServerStatus.CAUTION.getText();
|
return ServerStatus.CAUTION.getText();
|
||||||
}
|
}
|
||||||
|
else if (this.cpu_user + this.cpu_system == 0) {
|
||||||
|
return ServerStatus.FAILUR.getText();
|
||||||
|
}
|
||||||
return ServerStatus.SAFETY.getText();
|
return ServerStatus.SAFETY.getText();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -577,6 +589,9 @@ public class InferenceResultDto {
|
|||||||
if (this.gpuUtil >= 80) {
|
if (this.gpuUtil >= 80) {
|
||||||
return ServerStatus.CAUTION.getText();
|
return ServerStatus.CAUTION.getText();
|
||||||
}
|
}
|
||||||
|
else if (this.cpu_user + this.cpu_system == 0) {
|
||||||
|
return ServerStatus.FAILUR.getText();
|
||||||
|
}
|
||||||
return ServerStatus.SAFETY.getText();
|
return ServerStatus.SAFETY.getText();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -584,6 +599,9 @@ public class InferenceResultDto {
|
|||||||
if (this.memused >= 80) {
|
if (this.memused >= 80) {
|
||||||
return ServerStatus.CAUTION.getText();
|
return ServerStatus.CAUTION.getText();
|
||||||
}
|
}
|
||||||
|
else if (this.cpu_user + this.cpu_system == 0) {
|
||||||
|
return ServerStatus.FAILUR.getText();
|
||||||
|
}
|
||||||
return ServerStatus.SAFETY.getText();
|
return ServerStatus.SAFETY.getText();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.kamco.cd.kamcoback.inference.service;
|
package com.kamco.cd.kamcoback.inference.service;
|
||||||
|
|
||||||
|
import static com.kamco.cd.kamcoback.postgres.entity.QGpuMetricEntity.gpuMetricEntity;
|
||||||
|
import static com.kamco.cd.kamcoback.postgres.entity.QSystemMetricEntity.systemMetricEntity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
@@ -514,7 +517,39 @@ public class InferenceResultService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<InferenceServerStatusDto> getInferenceServerStatusList() {
|
public List<InferenceServerStatusDto> getInferenceServerStatusList() {
|
||||||
return inferenceResultCoreService.getInferenceServerStatusList();
|
|
||||||
|
List<InferenceServerStatusDto> dtoList = inferenceResultCoreService.getInferenceServerStatusList();
|
||||||
|
int size = dtoList.size();
|
||||||
|
|
||||||
|
System.out.println("size ="+size);
|
||||||
|
|
||||||
|
if( size == 0 )
|
||||||
|
{
|
||||||
|
for(int k=0; k<4; k++)
|
||||||
|
{
|
||||||
|
InferenceServerStatusDto dto = new InferenceServerStatusDto();
|
||||||
|
dto.setServerName("server0"+k);
|
||||||
|
dto.setCpu_user(0);
|
||||||
|
dto.setCpu_system(0);
|
||||||
|
dto.setMemused(0);
|
||||||
|
dto.setKbmemused(0L);
|
||||||
|
dto.setGpuUtil(0);
|
||||||
|
|
||||||
|
dtoList.add(dto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
systemMetricEntity.serverName,
|
||||||
|
systemMetricEntity.cpuUser,
|
||||||
|
systemMetricEntity.cpuSystem,
|
||||||
|
systemMetricEntity.memused,
|
||||||
|
systemMetricEntity.kbmemused,
|
||||||
|
gpuMetricEntity.gpuUtil
|
||||||
|
*/
|
||||||
|
//if( dtoList)
|
||||||
|
|
||||||
|
return dtoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -118,6 +118,8 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
queryFactory
|
queryFactory
|
||||||
.select(systemMetricEntity.timestamp.max())
|
.select(systemMetricEntity.timestamp.max())
|
||||||
.from(systemMetricEntity)
|
.from(systemMetricEntity)
|
||||||
|
//.where(systemMetricEntity.timestamp.goe(OffsetDateTime.now().minusMinutes(5)))
|
||||||
|
.where(systemMetricEntity.timestamp.goe(OffsetDateTime.now().minusSeconds(30)))
|
||||||
.groupBy(systemMetricEntity.serverName)
|
.groupBy(systemMetricEntity.serverName)
|
||||||
.fetch();
|
.fetch();
|
||||||
|
|
||||||
@@ -125,6 +127,8 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
queryFactory
|
queryFactory
|
||||||
.select(gpuMetricEntity.timestamp.max())
|
.select(gpuMetricEntity.timestamp.max())
|
||||||
.from(gpuMetricEntity)
|
.from(gpuMetricEntity)
|
||||||
|
//.where(gpuMetricEntity.timestamp.goe(OffsetDateTime.now().minusMinutes(5)))
|
||||||
|
.where(gpuMetricEntity.timestamp.goe(OffsetDateTime.now().minusSeconds(30)))
|
||||||
.groupBy(gpuMetricEntity.serverName)
|
.groupBy(gpuMetricEntity.serverName)
|
||||||
.fetch();
|
.fetch();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user