|
112 | 112 | import java.util.stream.Stream; |
113 | 113 | import java.util.stream.StreamSupport; |
114 | 114 |
|
115 | | -import static org.opensearch.cluster.ClusterManagerMetrics.NODE_ID_TAG; |
| 115 | +import static org.opensearch.cluster.ClusterManagerMetrics.FOLLOWER_NODE_ID_TAG; |
116 | 116 | import static org.opensearch.cluster.ClusterManagerMetrics.REASON_TAG; |
117 | 117 | import static org.opensearch.cluster.coordination.FollowersChecker.NODE_LEFT_REASON_DISCONNECTED; |
118 | 118 | import static org.opensearch.cluster.coordination.FollowersChecker.NODE_LEFT_REASON_FOLLOWER_CHECK_RETRY_FAIL; |
119 | 119 | import static org.opensearch.cluster.coordination.FollowersChecker.NODE_LEFT_REASON_HEALTHCHECK_FAIL; |
| 120 | +import static org.opensearch.cluster.coordination.FollowersChecker.NODE_LEFT_REASON_LAGGING; |
120 | 121 | import static org.opensearch.cluster.coordination.NoClusterManagerBlockService.NO_CLUSTER_MANAGER_BLOCK_ID; |
121 | 122 | import static org.opensearch.cluster.decommission.DecommissionHelper.nodeCommissioned; |
122 | 123 | import static org.opensearch.gateway.ClusterStateUpdaters.hideStateIfNotRecovered; |
@@ -369,14 +370,15 @@ private void removeNode(DiscoveryNode discoveryNode, String reason) { |
369 | 370 | ); |
370 | 371 | String reasonToPublish = switch (reason) { |
371 | 372 | case NODE_LEFT_REASON_DISCONNECTED -> "disconnected"; |
| 373 | + case NODE_LEFT_REASON_LAGGING -> "lagging"; |
372 | 374 | case NODE_LEFT_REASON_FOLLOWER_CHECK_RETRY_FAIL -> "follower.check.fail"; |
373 | 375 | case NODE_LEFT_REASON_HEALTHCHECK_FAIL -> "health.check.fail"; |
374 | 376 | default -> reason; |
375 | 377 | }; |
376 | 378 | clusterManagerMetrics.incrementCounter( |
377 | 379 | clusterManagerMetrics.nodeLeftCounter, |
378 | 380 | 1.0, |
379 | | - Optional.ofNullable(Tags.create().addTag(NODE_ID_TAG, discoveryNode.getId()).addTag(REASON_TAG, reasonToPublish)) |
| 381 | + Optional.ofNullable(Tags.create().addTag(FOLLOWER_NODE_ID_TAG, discoveryNode.getId()).addTag(REASON_TAG, reasonToPublish)) |
380 | 382 | ); |
381 | 383 | } |
382 | 384 | } |
|
0 commit comments