-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy path_mysql-diag.html.md.erb
80 lines (51 loc) · 3 KB
/
_mysql-diag.html.md.erb
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
This topic discusses how to use the `mysql-diag` tool in MySQL for Pivotal Cloud Foundry (PCF).
`mysql-diag` prints the state of your MySQL highly available (HA) cluster and
suggests solutions if your node fails. Pivotal recommends running this tool against
your HA cluster before all deployments.
`mysql-diag` checks the following information about the status of your HA cluster:
- Membership status of all nodes
- Size as it appears to all nodes
- If it needs to be bootstrapped
- If replication is working
- Used disk space and inodes per server
## <a id='bosh-v2'></a>Run mysql-diag Using the BOSH Command Line Interface (CLI)
To use the BOSH CLI to run `mysql-diag`, do the following:
1. Obtain the information needed to use the BOSH CLI by doing the procedure in
[Gather Credential and IP Address Information](https://docs.pivotal.io/pivotalcf/customizing/trouble-advanced.html#gather).
1. SSH into your Ops Manager VM by doing the procedure in
[Log in to the Ops Manager VM with SSH](https://docs.pivotal.io/pivotalcf/customizing/trouble-advanced.html#ssh)
for your IaaS.
1. Log in to your BOSH Director by doing the procedure in
[Log in to the BOSH Director](https://docs.pivotal.io/pivotalcf/customizing/trouble-advanced.html#log-in).
1. Identify the VM to log in to with SSH by running the following command:
```
bosh -e MY-ENV -d MY-DEPLOYMENT vms
```
Where:
+ `MY-ENV` is the name of your environment.
+ `MY-DEPLOYMENT` is the name of your deployment.
1. Record the GUID associated with the `mysql-monitor` VM, also known as the jumpbox VM.
1. SSH into your `mysql-monitor` VM by running the following command:
```
bosh -e MY-ENV -d MY-DEP ssh mysql-monitor/GUID
```
Where:
+ `MY-ENV` is the name of your environment.
+ `MY-DEPLOYMENT` is the name of your deployment.
+ `GUID` is the GUID you recorded in the previous step.
1. View the status of your HA cluster by running the following command:
```
mysql-diag
```
## <a id="healthy"></a> Example Healthy Output ##
The `mysql-diag` command returns the following message if your canary status is healthy:
<pre class="terminal">Checking canary status...healthy</pre>
Here is a sample `mysql-diag` output after the tool identified a healthy HA cluster:
<%= image_tag('mysql-diag-healthy-screen-shot.png') %>
<a href="images/mysql-diag-healthy-screen-shot.png" target="_blank">View a larger version of this image.</a>
## <a id="unhealthy"></a> Example Unhealthy Output ##
The `mysql-diag` command returns the following message if your canary status is unhealthy:
<pre class="terminal">Checking canary status...unhealthy</pre>
In the event of a broken HA cluster, running `mysql-diag` outputs actionable steps meant to expedite the recovery of that HA cluster. Below is a sample `mysql-diag` output after the tool identified an unhealthy HA cluster:
<%= image_tag('mysql-diag-unhealthy-screen-shot.png') %>
<a href="images/mysql-diag-unhealthy-screen-shot.png" target="_blank">View a larger version of this image.</a>