in manager/manager/src/main/java/org/apache/doris/stack/service/manager/MonitoringQueryService.java [508:538]
public Object handleScalarMonitor(HttpServletRequest request, HttpServletResponse response, String typeString)
throws Exception {
ClusterInfoType type;
try {
type = ClusterInfoType.valueOf(typeString.toUpperCase());
} catch (Exception e) {
throw new IllegalArgumentException("No such monitor type: " + typeString);
}
ClusterInfoEntity clusterInfoEntity = checkAndHandleCluster(request, response);
String jobName = clusterInfoEntity.getPrometheusJobName();
if (Strings.isNullOrEmpty(queryUrl) || Strings.isNullOrEmpty(queryRangeUrl)) {
intPrometheusUrl();
}
switch (type) {
case NODE_NUM:
return nodeNum(jobName);
case DISKS_CAPACITY:
return disksCapacity(jobName);
case STATISTIC:
return statistic(jobName);
case FE_LIST:
return feList(jobName);
case BE_LIST:
return beList(jobName);
default:
throw new RuntimeException("No such monitoring type is defined:" + type);
}
}