提交 98a5c7b7 编写于 作者: F fengqiongfeng 提交者: EricZeng

[Optimize]健康检查日志优化(#869)

上级 e204023b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册