mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 03:42:07 +08:00
[Optimize]健康检查日志优化(#869)
This commit is contained in:
@@ -58,7 +58,7 @@ public class HealthCheckClusterService extends AbstractHealthCheckService {
|
||||
|
||||
Result<ClusterMetrics> clusterMetricsResult = clusterMetricService.getLatestMetricsFromES(param.getClusterPhyId(), Arrays.asList(ClusterMetricVersionItems.CLUSTER_METRIC_ACTIVE_CONTROLLER_COUNT));
|
||||
if (clusterMetricsResult.failed() || !clusterMetricsResult.hasData()) {
|
||||
log.error("method=checkClusterNoController||param={}||config={}||result={}||errMsg=get metrics failed",
|
||||
log.error("method=checkClusterNoController||param={}||config={}||result={}||errMsg=get metrics from es failed",
|
||||
param, valueConfig, clusterMetricsResult);
|
||||
return null;
|
||||
}
|
||||
@@ -71,7 +71,11 @@ public class HealthCheckClusterService extends AbstractHealthCheckService {
|
||||
);
|
||||
|
||||
Float activeController = clusterMetricsResult.getData().getMetric(ClusterMetricVersionItems.CLUSTER_METRIC_ACTIVE_CONTROLLER_COUNT);
|
||||
|
||||
if (activeController == null) {
|
||||
log.error("method=checkClusterNoController||param={}||config={}||errMsg=get metrics from es failed, activeControllerCount is null",
|
||||
param, valueConfig);
|
||||
return null;
|
||||
}
|
||||
|
||||
checkResult.setPassed(activeController.intValue() != valueConfig.getValue().intValue() ? 0: 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user