<commit_before>// Module included in the following assemblies:
//
// * backup_and_restore/replacing-unhealthy-etcd-member.adoc

[id="restore-identify-unhealthy-etcd-member_{context}"]
= Identifying an unhealthy etcd member

You can identify if your cluster has an unhealthy etcd member.

.Prerequisites

* Access to the cluster as a user with the `cluster-admin` role.

.Procedure

. Check the status of the `EtcdMembersAvailable` status condition using the following command:
+
----
$ oc get etcd -o=jsonpath='{range .items[0].status.conditions[?(@.type=="EtcdMembersAvailable")]}{.message}{"\n"}'
----

. Review the output:
+
----
ip-10-0-164-97.ec2.internal,ip-10-0-154-204.ec2.internal members are available,  have not started, ip-10-0-131-183.ec2.internal are unhealthy,  are unknown
----
+
In this example, `ip-10-0-131-183.ec2.internal are unhealthy` indicates that the `ip-10-0-131-183.ec2.internal` etcd member is unhealthy.

////
Once https://github.com/openshift/cluster-etcd-operator/pull/307 merges for 4.4, use this output:

----
2 of 3 members are available, ip-10-0-131-183.ec2.internal is unhealthy
----
+
This example output shows that the `ip-10-0-131-183.ec2.internal` etcd member is unhealthy.
////<commit_msg>BZ-1845226: Updating the output for the etcd cluster operator's status<commit_after>// Module included in the following assemblies:
//
// * backup_and_restore/replacing-unhealthy-etcd-member.adoc

[id="restore-identify-unhealthy-etcd-member_{context}"]
= Identifying an unhealthy etcd member

You can identify if your cluster has an unhealthy etcd member.

.Prerequisites

* Access to the cluster as a user with the `cluster-admin` role.

.Procedure

. Check the status of the `EtcdMembersAvailable` status condition using the following command:
+
----
$ oc get etcd -o=jsonpath='{range .items[0].status.conditions[?(@.type=="EtcdMembersAvailable")]}{.message}{"\n"}'
----

. Review the output:
+
----
2 of 3 members are available, ip-10-0-131-183.ec2.internal is unhealthy
----
+
This example output shows that the `ip-10-0-131-183.ec2.internal` etcd member is unhealthy.
{'fraction_non_alphanumeric': 0.1383737517831669, 'fraction_numerical': 0.050879695672848314, 'mean_word_length': 3.9505882352941177, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2135921', 'n_tokens_mistral': 767, 'n_tokens_neox': 671, 'n_words': 199}