113
113
import java .util .stream .StreamSupport ;
114
114
115
115
import static org .opensearch .cluster .ClusterManagerMetrics .NODE_ID_TAG ;
116
+ import static org .opensearch .cluster .ClusterManagerMetrics .REASON_TAG ;
117
+ import static org .opensearch .cluster .coordination .FollowersChecker .NODE_LEFT_REASON_DISCONNECTED ;
118
+ import static org .opensearch .cluster .coordination .FollowersChecker .NODE_LEFT_REASON_FOLLOWER_CHECK_RETRY_FAIL ;
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 ;
116
121
import static org .opensearch .cluster .coordination .NoClusterManagerBlockService .NO_CLUSTER_MANAGER_BLOCK_ID ;
117
122
import static org .opensearch .cluster .decommission .DecommissionHelper .nodeCommissioned ;
118
123
import static org .opensearch .gateway .ClusterStateUpdaters .hideStateIfNotRecovered ;
@@ -129,11 +134,6 @@ public class Coordinator extends AbstractLifecycleComponent implements Discovery
129
134
public static final long ZEN1_BWC_TERM = 0 ;
130
135
131
136
private static final Logger logger = LogManager .getLogger (Coordinator .class );
132
- public static final String NODE_LEFT_REASON_LAGGING = "lagging" ;
133
- public static final String NODE_LEFT_REASON_DISCONNECTED = "disconnected" ;
134
- public static final String NODE_LEFT_REASON_HEALTHCHECK_FAIL = "health check failed" ;
135
- public static final String NODE_LEFT_REASON_FOLLOWER_CHECK_RETRY_FAIL = "followers check retry count exceeded" ;
136
- private static final String REASON_TAG = "Reason" ;
137
137
138
138
// the timeout before emitting an info log about a slow-running publication
139
139
public static final Setting <TimeValue > PUBLISH_INFO_TIMEOUT_SETTING = Setting .timeSetting (
@@ -372,8 +372,8 @@ private void removeNode(DiscoveryNode discoveryNode, String reason) {
372
372
String reasonToPublish = switch (reason ) {
373
373
case NODE_LEFT_REASON_DISCONNECTED -> "disconnected" ;
374
374
case NODE_LEFT_REASON_LAGGING -> "lagging" ;
375
- case NODE_LEFT_REASON_FOLLOWER_CHECK_RETRY_FAIL -> "followerCheckFail " ;
376
- case NODE_LEFT_REASON_HEALTHCHECK_FAIL -> "healthCheckFail " ;
375
+ case NODE_LEFT_REASON_FOLLOWER_CHECK_RETRY_FAIL -> "follower.check.fail " ;
376
+ case NODE_LEFT_REASON_HEALTHCHECK_FAIL -> "health.check.fail " ;
377
377
default -> reason ;
378
378
};
379
379
clusterManagerMetrics .incrementCounter (
0 commit comments