You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/clinic-user-guide.md
+65-3Lines changed: 65 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,12 +19,74 @@ For clusters deployed using TiDB Operator, Diag is deployed as a standalone Pod.
19
19
20
20
You can easily collect data from clusters and perform a quick check using the Diag of PingCAP Clinic:
21
21
22
-
-[Use Diag to collect data](#use-diag-to-collect-data)
22
+
-[Use Diag to collect diagnostic data](#use-diag-to-collect-data)
23
23
-[Use Diag to perform a quick check on the cluster](#use-diag-to-perform-a-quick-check-on-the-cluster)
24
24
25
-
## Install Diag client
25
+
For TiDB clusters deployed using TiDB Operator, Diag can run in two modes: command line mode that can run anywhere and server mode deployed to k8s. Command line mode is simpler to use and can collect some logs.
26
26
27
-
The following sections describe how to install Diag.
27
+
## Use Diag CLI
28
+
29
+
Diag CLI can run anywhere that can connect to the k8s where the TiDB cluster is located. It can be a pod with permissions in the cluster or a developer's laptop.
30
+
31
+
### Step 1: Install TiUP
32
+
33
+
Run `tiup --version` to check if TiUP is already installed. If TiUP is already installed, skip this step. If TiUP is not installed, run the following command:
34
+
35
+
```
36
+
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
37
+
```
38
+
39
+
### Step 2: Install Diag
40
+
41
+
```shell
42
+
tiup install diag
43
+
```
44
+
45
+
### Step 3: Run Diag
46
+
47
+
1. Run Diag to collect diagnostic data.
48
+
49
+
For example, to collect diagnostic data from 4 hours ago to 2 hours ago from the current time, you can run the following command:
After running the Diag data collection command, Diag will not immediately start collecting data. Instead, it will provide an estimated data size and storage path in the output and ask if you want to proceed with data collection. If you confirm to start collecting data, enter `Y`.
62
+
63
+
After collection is complete, Diag will prompt with the folder path where the collected data is stored.
64
+
65
+
2. Upload the collected data to Clinic Server.
66
+
67
+
>**Note:**
68
+
>
69
+
> The size of uploaded data (compressed folder file) must not exceed 3 GB, otherwise the upload will fail.
70
+
71
+
- If your cluster network can access the Internet, you can upload the collected data package folder using the following command:
72
+
73
+
```bash
74
+
tiup diag upload ${filepath}
75
+
```
76
+
77
+
After the upload is complete, Diag will provide the diagnostic data download URL.
78
+
79
+
- If your cluster cannot access the Internet, you need to package the data first and then upload it. For specific steps, refer to [Upload Method 2: Package and Upload](https://docs.pingcap.com/tidb/stable/clinic-user-guide-for-tiup/#method-2-pack-and-upload-data).
80
+
81
+
3. After completing the data upload, get the diagnostic data link through the `Download URL`in the upload output.
82
+
83
+
The diagnostic data includes cluster name, cluster topology information, log content in the diagnostic data package, and Grafana Dashboard information rebuilt based on metrics information in the diagnostic data package.
84
+
85
+
You can use this data to find and diagnose cluster problems yourself, or you can send the link to PingCAP technical support staff to assist with remote troubleshooting of cluster issues.
86
+
87
+
## Install Diag Server
88
+
89
+
This section provides detailed instructions for installing Diag.
0 commit comments