summaryrefslogtreecommitdiffstats
path: root/health/guides/consul/consul_autopilot_health_status.md
blob: 42ccab5a674c669cd37ad6a86fb2ff6805680485 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
### Understand the alert

This alert checks the health status of the Consul cluster regarding its autopilot functionality. If you receive this alert, it means that the Consul datacenter is experiencing issues, and its health status has been reported as `unhealthy` by the Consul server.

### What is Consul autopilot?

Consul's autopilot feature provides automatic management and stabilization features for Consul server clusters, ensuring that the clusters remain in a healthy state. These features include server health monitoring, automatic dead server reaping, and stable server introduction.

### What does unhealthy mean?

An unhealthy Consul cluster could experience issues regarding its operations, services, leader elections, and cluster consistency. In this alert scenario, the cluster health functionality is not working correctly, and it could lead to stability and performance problems.

### Troubleshoot the alert

Here are some steps to troubleshoot the consul_autopilot_health_status alert:

1. Check the logs of the Consul server to identify any error messages or warning signs. The logs will often provide insights into the underlying problems.

   ```
   journalctl -u consul
   ```

2. Inspect the Consul health status using the Consul CLI or API:

   ```
   consul operator autopilot get-config
   ```
   
   Using the Consul HTTP API:
   ```
   curl http://<consul_server>:8500/v1/operator/autopilot/health
   ```

3. Verify the configuration of Consul servers, check the `retry_join` and addresses of the Consul servers in the configuration file:

   ```
   cat /etc/consul.d/consul.hcl | grep retry_join
   ```

4. Ensure that there is a sufficient number of Consul servers and that they are healthy. The `consul members` command will show the status of cluster members:

   ```
   consul members
   ```
   
5. Check the network connectivity between Consul servers by running network diagnostics like ping and traceroute.

6. Review Consul documentation to gain a deeper understanding of the autopilot health issues and potential configuration problems.


### Useful resources

- [Consul CLI reference](https://www.consul.io/docs/commands)