|
1 | 1 | # Using the must-gather tool
|
2 | 2 |
|
3 | 3 |
|
4 |
| -You can collect logs, metrics, and information about OADP custom resources by using the must-gather tool. The must-gather data must be attached to all customer cases. |
5 |
| -You can run the must-gather tool with the following data collection options: |
6 |
| -* Full must-gather data collection collects Prometheus metrics, pod logs, and Velero CR information for all namespaces where the OADP Operator is installed. |
7 |
| -* Essential must-gather data collection collects pod logs and Velero CR information for a specific duration of time, for example, one hour or 24 hours. Prometheus metrics and duplicate logs are not included. |
8 |
| -* must-gather data collection with timeout. Data collection can take a long time if there are many failed Backup CRs. You can improve performance by setting a timeout value. |
9 |
| -* Prometheus metrics data dump downloads an archive file containing the metrics data collected by Prometheus. |
| 4 | +You can collect logs and information about OADP custom resources by using the must-gather tool. The must-gather data must be attached to all customer cases. |
| 5 | +The must-gather tool is a container and does not run all the time. The tool runs for a few minutes only after you invoke the tool by running the must-gather command. |
| 6 | + |
| 7 | +# Using the must-gather tool |
| 8 | + |
| 9 | +You can run the must-gather tool with the following options. To use an option, you can add a flag corresponding to that option in the must-gather command. |
| 10 | + |
| 11 | +Default configuration:: This configuration collects pod logs, OADP and Velero custom resource (CR) information for all namespaces where the OADP Operator is installed. |
| 12 | +Timeout:: Data collection can take a long time if there are many failed Backup CRs. You can improve performance by setting a timeout value. |
| 13 | +Insecure TLS connections:: If a custom CA certificate is used, use the must-gather tool with insecure TLS connections. |
| 14 | + |
| 15 | +The must-gather tool generates a Markdown output file with the collected information. The Markdown file is located in a cluster directory. |
| 16 | + |
10 | 17 | * You have logged in to the Red Hat OpenShift Container Platform cluster as a user with the cluster-admin role.
|
11 | 18 | * You have installed the OpenShift CLI (oc).
|
12 |
| -* You must use Red Hat Enterprise Linux (RHEL) 9 with OADP 1.4. |
| 19 | +* You are using OADP 1.3 or 1.4. |
| 20 | + |
13 | 21 | 1. Navigate to the directory where you want to store the must-gather data.
|
14 | 22 | 2. Run the oc adm must-gather command for one of the following data collection options:
|
15 |
| -* For full must-gather data collection, including Prometheus metrics, run the following command: |
| 23 | +* To use the default configuration of the must-gather tool, run one of the following commands: |
| 24 | +* For OADP 1.3, run the following command: |
16 | 25 |
|
17 | 26 | ```terminal
|
18 |
| -$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.4 |
| 27 | +$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.3 |
19 | 28 | ```
|
20 | 29 |
|
21 |
| - |
22 |
| -The data is saved as must-gather/must-gather.tar.gz. You can upload this file to a support case on the Red Hat Customer Portal. |
23 |
| - |
24 |
| -For essential must-gather data collection, without Prometheus metrics, for a specific time duration, run the following command: |
| 30 | +* For OADP 1.4, run the following command: |
25 | 31 |
|
26 | 32 | ```terminal
|
27 |
| -$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.4 \ |
28 |
| - -- /usr/bin/gather_<time>_essential 1 |
| 33 | +$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.4 |
29 | 34 | ```
|
30 | 35 |
|
31 |
| -Specify the time in hours. Allowed values are 1h, 6h, 24h, 72h, or all, for example, gather_1h_essential or gather_all_essential. |
32 |
| -* For must-gather data collection with timeout, run the following command: |
| 36 | +* To use the timeout flag with the must-gather tool, run one of the following commands: |
| 37 | +* For OADP 1.3, run the following command: |
33 | 38 |
|
34 | 39 | ```terminal
|
35 |
| -$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.4 \ |
36 |
| - -- /usr/bin/gather_with_timeout <timeout> 1 |
| 40 | +$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.3 -- /usr/bin/gather --request-timeout <timeout> 1 |
37 | 41 | ```
|
38 | 42 |
|
39 |
| -Specify a timeout value in seconds. |
40 |
| -* For a Prometheus metrics data dump, run the following command: |
| 43 | +Specify a timeout value. |
| 44 | +* For OADP 1.4, run the following command: |
41 | 45 |
|
42 | 46 | ```terminal
|
43 |
| -$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.4 -- /usr/bin/gather_metrics_dump |
| 47 | +$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.4 -- /usr/bin/gather_with_timeout <timeout> 1 |
44 | 48 | ```
|
45 | 49 |
|
46 |
| - |
47 |
| -This operation can take a long time. The data is saved as must-gather/metrics/prom_data.tar.gz. |
48 |
| -* Gathering cluster data |
49 |
| - |
50 |
| -# Using must-gather with insecure TLS connections |
51 |
| - |
52 |
| -If a custom CA certificate is used, the must-gather pod fails to grab the output for velero logs/describe. To use the must-gather tool with insecure TLS connections, you can pass the gather_without_tls flag to the must-gather command. |
53 |
| - |
54 |
| -* Pass the gather_without_tls flag, with value set to true, to the must-gather tool by using the following command: |
55 |
| -1. For OADP 1.3, run the following command: |
| 50 | +Specify a timeout value in seconds. |
| 51 | +* To use the insecure TLS connection flag with the must-gather tool, run one of the following commands: |
| 52 | +* For OADP 1.3, run the following command: |
56 | 53 |
|
57 | 54 | ```terminal
|
58 |
| -$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.3 -- /usr/bin/gather_without_tls <true/false> |
| 55 | +$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.3 -- /usr/bin/gather --skip-tls |
59 | 56 | ```
|
60 | 57 |
|
61 |
| -2. For OADP 1.4, run the following command: |
| 58 | +* For OADP 1.4, run the following command: |
62 | 59 |
|
63 | 60 | ```terminal
|
64 |
| -$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.4 -- /usr/bin/gather_without_tls <true/false> |
| 61 | +$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.4 -- /usr/bin/gather_without_tls <value> 1 |
65 | 62 | ```
|
66 | 63 |
|
67 |
| - |
68 |
| -By default, the flag value is set to false. Set the value to true to allow insecure TLS connections. |
69 |
| - |
70 |
| -# Combining options when using the must-gather tool |
71 |
| - |
72 |
| -Currently, it is not possible to combine must-gather scripts, for example specifying a timeout threshold while permitting insecure TLS connections. In some situations, you can get around this limitation by setting up internal variables on the must-gather command line, such as the following examples: |
73 |
| - |
74 |
| -* For OADP 1.3: |
| 64 | +By default, the value is false. Set to true to allow insecure TLS connections. |
| 65 | +* To use a combination of the insecure TLS connection, and the timeout flags with the must-gather tool, run one of the following commands: |
| 66 | +* For OADP 1.3, run the following command: |
75 | 67 |
|
76 | 68 | ```terminal
|
77 |
| -$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.3 -- skip_tls=true /usr/bin/gather_with_timeout <timeout_value_in_seconds> |
| 69 | +$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.3 -- /usr/bin/gather --request-timeout 15s --skip-tls=true 1 |
78 | 70 | ```
|
79 | 71 |
|
80 |
| -* For OADP 1.4: |
| 72 | +By default, the --skip-tls flag value is false. Set the value to true to allow insecure TLS connections. Specify a timeout value. |
| 73 | +* For OADP 1.4, run the following command: |
81 | 74 |
|
82 | 75 | ```terminal
|
83 |
| -$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.4 -- skip_tls=true /usr/bin/gather_with_timeout <timeout_value_in_seconds> |
| 76 | +$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.4 --skip_tls=true /usr/bin/gather_with_timeout <timeout_value_in_seconds> 1 |
84 | 77 | ```
|
85 | 78 |
|
| 79 | +By default, the --skip-tls flag value is false. Set the value to true to allow insecure TLS connections. Specify a timeout value. |
86 | 80 |
|
87 |
| -In these examples, set the skip_tls variable before running the gather_with_timeout script. The result is a combination of gather_with_timeout and gather_without_tls. |
88 |
| - |
89 |
| -The only other variables that you can specify this way are the following: |
90 |
| - |
91 |
| -* logs_since, with a default value of 72h |
92 |
| -* request_timeout, with a default value of 0s |
93 |
| - |
94 |
| -If DataProtectionApplication custom resource (CR) is configured with s3Url and insecureSkipTLS: true, the CR does not collect the necessary logs because of a missing CA certificate. To collect those logs, run the must-gather command with the following option: |
| 81 | +1. Verify that the Markdown output file is generated at the following location: must-gather.local.89…​054550/registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.5-sha256-0…​84/clusters/a4…​86/oadp-must-gather-summary.md |
| 82 | +2. Review the must-gather data in the Markdown file by opening the file in a Markdown previewer. For an example output, refer to the following image. You can upload this output file to a support case on the Red Hat Customer Portal. |
| 83 | +Example markdown output of must-gather tool |
| 84 | +![must-gather markdown output] |
95 | 85 |
|
96 |
| -* For OADP 1.3: |
97 |
| - |
98 |
| -```terminal |
99 |
| -$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.3 -- /usr/bin/gather_without_tls true |
100 |
| -``` |
101 |
| - |
102 |
| -* For OADP 1.4: |
103 |
| - |
104 |
| -```terminal |
105 |
| -$ oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.4 -- /usr/bin/gather_without_tls true |
106 |
| -``` |
| 86 | +* Gathering cluster data |
0 commit comments