Skip to content

Commit

Permalink
monitoring controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Cat-Drink committed Dec 7, 2024
1 parent a5e0e5e commit c747e45
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,24 @@ public class MonitoringController {
@Operation(summary = "agent healthy", description = "agent healthy check")
@GetMapping("agenthealthy")
public ResponseEntity<JsonNode> agentHostsHealthyStatus() {
// json for response
return ResponseEntity.success(monitoringService.queryAgentsHealthyStatus());
}

@Operation(summary = "agent Info", description = "agent info query")
@GetMapping("agentInfo")
@Operation(summary = "staticAgentInfo", description = "agent info query")
@GetMapping("staticAgentInfo")
public ResponseEntity<JsonNode> queryAgentsInfo() {
return ResponseEntity.success(monitoringService.queryAgentsInfo());
}

@Operation(summary = "dynamicAgentInfo", description = "agent info query")
@GetMapping("dynamicAgentInfo")
public ResponseEntity<JsonNode> queryAgentsInfo(@RequestParam(value = "pace", defaultValue = "1") String pace){
return ResponseEntity.success(monitoringService.queryAgentsInfo(pace));
}
@Operation(summary = "cluster info", description = "cluster info")
@GetMapping("clusterInfo")
public ResponseEntity<JsonNode> queryCluster(
@RequestParam(value = "clusterId") String clusterId,
@RequestParam(value = "step", defaultValue = "1m") String step) {
return ResponseEntity.success(monitoringService.queryClusterInfo(clusterId, step));
@RequestParam(value = "pace", defaultValue = "1") String pace) {
return ResponseEntity.success(monitoringService.queryClusterInfo(clusterId, pace));
}
}

0 comments on commit c747e45

Please sign in to comment.